Commit Graph

1762 Commits

Author SHA1 Message Date
Sanjay Patel c981f6f8e1 Revert "[Codegen][ReplaceWithVecLib] add pass to replace vector intrinsics with calls to vector library"
This reverts commit 2303e93e66.
Investigating bot failures.
2021-02-05 15:10:11 -05:00
Lukas Sommer 2303e93e66 [Codegen][ReplaceWithVecLib] add pass to replace vector intrinsics with calls to vector library
This patch adds a pass to replace calls to vector intrinsics
(i.e., LLVM intrinsics operating on vector operands) with
calls to a vector library.

Currently, calls to LLVM intrinsics are only replaced with
calls to vector libraries when scalar calls to intrinsics are
vectorized by the Loop- or SLP-Vectorizer.

With this pass, it is now possible to replace calls to LLVM
intrinsics already operating on vector operands, e.g., if
such code was generated by MLIR. For the replacement,
information from the TargetLibraryInfo, e.g., as specified
via -vector-library is used.

Differential Revision: https://reviews.llvm.org/D95373
2021-02-05 14:25:19 -05:00
Arthur Eubanks 39ceb5c9cf [gn build] Turn on new pass manager by default
Matches cmake build
2021-02-05 09:11:07 -08:00
Louis Dionne b51756819a [libc++] Rename include/support to include/__support
We do ship those headers, so the directory name should not be something
that can potentially conflict with user-defined directories.

Differential Revision: https://reviews.llvm.org/D95956
2021-02-04 10:16:33 -05:00
Nico Weber 26ca503bd2 [gn build] (manually) port 0609f257dc 2021-02-04 06:52:55 -05:00
Arthur Eubanks f020544601 [NewPM][HelloWorld] Move HelloWorld to Utils
To prevent creating a new component, which creates a new library.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D95907
2021-02-03 12:59:40 -08:00
LLVM GN Syncbot b86e9c83a6 [gn build] Port fcf03e7280 2021-02-03 05:46:53 +00:00
LLVM GN Syncbot 2569ab4deb [gn build] Port 4f58b1bd29 2021-02-02 22:57:59 +00:00
LLVM GN Syncbot 313a36130f [gn build] Port b63cd4db91 2021-02-01 14:24:45 +00:00
Nico Weber 229c1cff51 [gn build] port e90e455d2a 2021-01-29 08:36:19 -05:00
Nico Weber 64ced3ce89 [gn build] (semi-manually) port 2ff8662b5d 2021-01-29 06:48:17 -05:00
Nico Weber eae50bb210 [gn build] (manually) port 081c1db02d more 2021-01-28 13:32:49 -05:00
Nico Weber 8c54583b2e [gn build] (manually) port 3b625060fc 2021-01-28 13:26:37 -05:00
Nico Weber 658398c842 [gn build] (semi-manually) port 081c1db02d 2021-01-28 13:05:10 -05:00
LLVM GN Syncbot e19ec9ca41 [gn build] Port 0b50fa9945 2021-01-27 18:55:59 +00:00
Tom Stellard 5369517d20 Bump the trunk major version to 13
and clear the release notes.
2021-01-26 19:37:55 -08:00
LLVM GN Syncbot 1458987407 [gn build] Port bb9eb19829 2021-01-27 01:23:23 +00:00
Nico Weber 65e2fa5060 [gn build] fix get.py change 2021-01-26 19:20:23 -05:00
Nico Weber 4dcb5c4403 [gn build] restore build command removed in 9595a7ff55 for platforms without prebuilts 2021-01-26 19:19:31 -05:00
LLVM GN Syncbot da9a3540e2 [gn build] Port 1e634f3952 2021-01-26 20:48:31 +00:00
LLVM GN Syncbot 96f09aa2fb [gn build] Port 4edf35f11a 2021-01-26 19:12:09 +00:00
LLVM GN Syncbot 12b34ffc35 [gn build] Port e123cd674c 2021-01-25 20:11:10 +00:00
LLVM GN Syncbot d5c4de40c6 [gn build] Port 0057cc5a21 2021-01-23 14:07:39 +00:00
LLVM GN Syncbot dbf87da739 [gn build] Port 2325157c05 2021-01-23 13:38:51 +00:00
LLVM GN Syncbot 083088d136 [gn build] Port 622eaa4a4c 2021-01-22 21:40:40 +00:00
LLVM GN Syncbot 509741382f [gn build] Port 8214982b50 2021-01-22 10:24:45 +00:00
Arthur Eubanks a11bf9a7fb [AMDGPU][Inliner] Remove amdgpu-inline and add a new TTI inline hook
Having a custom inliner doesn't really fit in with the new PM's
pipeline. It's also extra technical debt.

amdgpu-inline only does a couple of custom things compared to the normal
inliner:
1) It disables inlining if the number of BBs in a function would exceed
   some limit
2) It increases the threshold if there are pointers to private arrays(?)

These can all be handled as TTI inliner hooks.
There already exists a hook for backends to multiply the inlining
threshold.

This way we can remove the custom amdgpu-inline pass.

This caused inline-hint.ll to fail, and after some investigation, it
looks like getInliningThresholdMultiplier() was previously getting
applied twice in amdgpu-inline (https://reviews.llvm.org/D62707 fixed it
not applying at all, so some later inliner change must have fixed
something), so I had to change the threshold in the test.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D94153
2021-01-21 20:29:17 -08:00
LLVM GN Syncbot 0cd1e47327 [gn build] Port d38be2ba0e 2021-01-21 23:19:45 +00:00
LLVM GN Syncbot 36b05d2e9f [gn build] Port 95ce32c787 2021-01-20 21:18:20 +00:00
Nico Weber 7f36df0fb1 [gn build] fix libcxx gn file with libcxx_abi_namespace set 2021-01-19 19:02:40 -05:00
Nico Weber be59bac184 [gn build] (manually) port 933518fff8 2021-01-19 18:51:39 -05:00
Nico Weber 0975604cc0 [gn build] (manually) port 387d3c2479 2021-01-14 16:19:25 -05:00
Valentin Clement ca98baa042 [openacc] Rename generated file from ACC.cpp.inc to ACC.inc to match D92955
This patch rename the tablegen generated file ACC.cpp.inc to ACC.inc in order
to match what was done in D92955. This file is included in header file as well as .cpp
file so it make more sense.

Reviewed By: sameeranjoshi

Differential Revision: https://reviews.llvm.org/D93485
2021-01-14 14:19:53 -05:00
LLVM GN Syncbot b4e083b0ef [gn build] Port 2f395b7092 2021-01-14 17:39:58 +00:00
LLVM GN Syncbot 14f322f074 [gn build] Port 60fda8ebb6 2021-01-13 17:33:32 +00:00
Nico Weber acea470c16 [gn build] Reorganize libcxx/include/BUILD.gn a bit
- Merge 6706342f48 -- no more libcxx_needs_site_config, we now
  always need it
- Since it was always off in practice, write_config bitrot. Unbitrot
  it so that it works
- Remove copy step and let concat step write to final location
  immediately -- and fix copy destination directory

As a side effect, libcxx/include/BUILD.gn now has only a single
sources list, which means the cmake sync script should be able to
automatically sync additions and removals of .h files. On the flipside,
this means this file now must be updated after most changes to
libcxx/include/__config_site.in, and looking through the last few months
of changes this looks like it's going to be a wash.
2021-01-12 21:30:06 -05:00
Nico Weber 25b3921f2f [gn build] (manually) port 79f99ba65d 2021-01-12 20:30:56 -05:00
Nico Weber 87d4ea2433 [gn build] Make an explicit `use_lld = true` on mac use lld.darwinnew
use_lld defaults to true on non-mac if clang_base_path is set (i.e.
the host compiler is a locally-built clang). On mac, the lld Mach-O
port used to be unusable, but ld64.lld.darwinnew is close to usable.
When explicitly setting `use_lld = true` in a GN build on a mac host,
check-lld passes, two check-clang tests fail, and a handful check-llvm
tests fail (the latter all due to -flat_namespace not yet being implemented).
2021-01-09 14:03:52 -05:00
LLVM GN Syncbot 657db0c6d4 [gn build] Port 9c4b2225b2 2021-01-08 13:30:54 +00:00
LLVM GN Syncbot 495b301de6 [gn build] Port 6b0ee02747 2021-01-08 04:23:02 +00:00
Nico Weber 2759041786 [gn build] (manually) merge a whole bunch of libc++ header files
I noticed __availability was missing, so I manually diffed the
file lists and put all recently(ish) added headers:
* __availability from 2eadbc8614
* concepts from 601f763182
* execution from 0a06eb911b
* numbers from 4f6c4b473c

Also remove libcxx_install_support_headers like the CMake build did in
6706342f48, and unconditionally copy
support/win32/{limits_msvc_win32.h,locale_win32.h} like the CMake
build always did as far as I can tell.
2021-01-07 22:09:35 -05:00
LLVM GN Syncbot ab814896dc [gn build] Port b12f26733a 2021-01-08 02:19:24 +00:00
LLVM GN Syncbot 5471b1fa40 [gn build] Port d2ddc694ff 2021-01-07 08:29:23 +00:00
LLVM GN Syncbot bf09e25e1e [gn build] Port fec1a442e3 2021-01-05 15:34:25 +00:00
LLVM GN Syncbot 835bdd1776 [gn build] Port 5799fc79c3 2021-01-02 22:46:43 +00:00
Nico Weber fc3f53fcda [gn build] (manually) port 5e31e226b5: Use Py3 for the build
Made necessary by 20670ba440, the first Py3-only change.
2021-01-01 22:14:03 -05:00
Nico Weber 51a292d994 [gn build] Switch copy_bundle_data from pax to cpio
This will hopefully fix the build not becoming clean when using Ninja
1.9+. Ninja 1.9 enabled high-resolution time stamps, but pax doesn't
correctly set high-resolution timestamps on its output.

See https://github.com/nico/hack/blob/master/notes/copydir.md for a
detailed writeup of problem and alternatives.
2020-12-30 13:59:03 -05:00
LLVM GN Syncbot 57b8afda10 [gn build] Port 480936e741 2020-12-30 00:40:53 +00:00
LLVM GN Syncbot a373eacb56 [gn build] Port 16c8f6e913 2020-12-30 00:29:58 +00:00
LLVM GN Syncbot 92207b2cce [gn build] Port 21314940c4 2020-12-29 23:18:48 +00:00
Arthur Eubanks 9abc457724 [NewPM][AMDGPU] Port amdgpu-simplifylib/amdgpu-usenative
And add them to the pipeline via
AMDGPUTargetMachine::registerPassBuilderCallbacks(), which mirrors
AMDGPUTargetMachine::adjustPassManager().

These passes can't be unconditionally added to PassRegistry.def since
they are only present when the AMDGPU backend is enabled. And there are
no target-specific headers in llvm/include, so parsing these pass names
must occur somewhere in the AMDGPU directory. I decided the best place
was inside the TargetMachine, since the PassBuilder invokes
TargetMachine::registerPassBuilderCallbacks() anyway. If we come up with
a cleaner solution for target-specific passes in the future that's fine,
but there aren't too many target-specific IR passes living in
target-specific directories so it shouldn't be too bad to change in the
future.

Reviewed By: ychen, arsenm

Differential Revision: https://reviews.llvm.org/D93863
2020-12-28 10:38:51 -08:00
Nico Weber 4c37453a04 clang: Build and run FrontendTests with CLANG_ENABLE_STATIC_ANALYZER=OFF too
They seem to pass fine with the analyzer off, and with this I would've
noticed my last check-clang break locally.
2020-12-23 14:27:09 -05:00
Nico Weber 853770f241 [gn build] (manually) port b8c37153d5 2020-12-22 06:35:40 -05:00
LLVM GN Syncbot c061cb521b [gn build] Port 195f44278c 2020-12-19 12:25:56 +00:00
LLVM GN Syncbot 07622b696f [gn build] Port e69e551e0e 2020-12-18 13:00:09 +00:00
Nico Weber 7e33fd9ce2 [gn build] Link with -Wl,--gdb-index when linking with LLD
For full-debug-info (is_debug=true / symbol_level=2 builds), this makes
linking 15% slower, but gdb startup 1500% faster (for lld: link time
3.9s->4.4s, gdb load time >30s->2s).

For link time, I ran

    bench.py -o {noindex,index}.txt \
        sh -c 'rm out/gn/bin/lld && ninja -C out/gn lld'

and then `ministat noindex.txt index.txt`:

```
x noindex.txt
+ index.txt
    N           Min           Max        Median           Avg        Stddev
x   5      3.784461     4.0200169     3.8452811     3.8754988   0.089902595
+   5       4.32496     4.6058481     4.3361208     4.4141198    0.12288267
Difference at 95.0% confidence
	0.538621 +/- 0.15702
	13.8981% +/- 4.05161%
	(Student's t, pooled s = 0.107663)
```

For gdb load time I loaded the crash in PR48392 with

    gdb -ex r --args ../out/gn/bin/ld64.lld.darwinnew @response.txt

and just stopped the time until the crash got displayed with a stopwatch
a few times. So the speedup there is less precise, but it's so
pronounced that that's ok (loads ~instantly with the patch, takes a very
long time without it).

Only doing this for LLD because I haven't tried it with other linkers.

Differential Revision: https://reviews.llvm.org/D92844
2020-12-17 15:39:00 -05:00
Nico Weber 85ffbe5d6a [gn build] (manually) merge f4c8b80318 2020-12-17 15:09:51 -05:00
LLVM GN Syncbot 23d183f190 [gn build] Port dae34463e3 2020-12-17 17:28:45 +00:00
Arthur Eubanks c1f30e5817 [gn build] Add symbol_level to adjust debug info level
is_debug by default makes symbol_level = 2 and !is_debug means by
default symbol_level = 0.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D92958
2020-12-17 09:20:53 -08:00
Xiang1 Zhang 39584ae5b5 [Debugify] Support checking Machine IR debug info
Add mir-check-debug pass to check MIR-level debug info.

For IR-level, currently, LLVM have debugify + check-debugify to generate
and check debug IR. Much like the IR-level pass debugify, mir-debugify
inserts sequentially increasing line locations to each MachineInstr in a
Module, But there is no equivalent MIR-level check-debugify pass, So now
we support it at "mir-check-debug".

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D91595
2020-12-16 22:17:25 -08:00
Xiang1 Zhang 1e42ad9d62 Revert "[Debugify] Support checking Machine IR debug info"
This reverts commit 50aaa8c274.
2020-12-16 20:12:33 -08:00
Xiang1 Zhang 50aaa8c274 [Debugify] Support checking Machine IR debug info
Add mir-check-debug pass to check MIR-level debug info.

For IR-level, currently, LLVM have debugify + check-debugify to generate
and check debug IR. Much like the IR-level pass debugify, mir-debugify
inserts sequentially increasing line locations to each MachineInstr in a
Module, But there is no equivalent MIR-level check-debugify pass, So now
we support it at "mir-check-debug".

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D91595
2020-12-16 18:04:05 -08:00
Nico Weber f48dae3108 [gn build] (manually) port ddffcdf0a6 2020-12-16 20:49:56 -05:00
LLVM GN Syncbot 672cdc84d2 [gn build] Port ac068e014b 2020-12-17 00:07:28 +00:00
LLVM GN Syncbot d5700fdf10 [gn build] Port 6eff12788e 2020-12-16 17:38:06 +00:00
LLVM GN Syncbot 70b0d15243 [gn build] Port b9c77542e2 2020-12-16 00:03:26 +00:00
LLVM GN Syncbot 086954412f [gn build] Port d2ed9d6b7e 2020-12-15 03:35:00 +00:00
Nico Weber da2551f3d1 Revert "[Debugify] Support checking Machine IR debug info"
This reverts commit c4d2d4337d.
Necessary to revert 2a5675f11d.
2020-12-14 22:14:48 -05:00
Xiang1 Zhang c4d2d4337d [Debugify] Support checking Machine IR debug info
Add mir-check-debug pass to check MIR-level debug info.

For IR-level, currently, LLVM have debugify + check-debugify to generate
and check debug IR. Much like the IR-level pass debugify, mir-debugify
inserts sequentially increasing line locations to each MachineInstr in a
Module, But there is no equivalent MIR-level check-debugify pass, So now
we support it at "mir-check-debug".

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D91595
2020-12-14 17:53:46 -08:00
Xiang1 Zhang fc0f4010bb Revert "[Debugify] Support checking Machine IR debug info"
This reverts commit 57a3d9ec4a.
2020-12-14 17:48:49 -08:00
Xiang1 Zhang 57a3d9ec4a [Debugify] Support checking Machine IR debug info
Add mir-check-debug pass to check MIR-level debug info.

For IR-level, currently, LLVM have debugify + check-debugify to generate
and check debug IR. Much like the IR-level pass debugify, mir-debugify
inserts sequentially increasing line locations to each MachineInstr in a
Module, But there is no equivalent MIR-level check-debugify pass, So now
we support it at "mir-check-debug".

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D95195
2020-12-14 17:38:01 -08:00
Nico Weber 2733a5a5b4 [gn build] (semi-manually) port 19d57b5c42 2020-12-14 18:23:15 -05:00
Nico Weber 9412932bb5 [gn build] (semi-manually) port 7ad49aec12 2020-12-14 18:22:54 -05:00
LLVM GN Syncbot 658dc21c2d [gn build] Port b577d2df7b 2020-12-11 18:37:39 +00:00
LLVM GN Syncbot eb1cf304e4 [gn build] Port 5663bf201f 2020-12-11 09:17:05 +00:00
LLVM GN Syncbot 7b48adec21 [gn build] Port 9b76160e53 2020-12-11 08:40:54 +00:00
LLVM GN Syncbot 6b1bf905d0 [gn build] Port 705a4c149d 2020-12-11 01:40:59 +00:00
LLVM GN Syncbot eaa9f6b2cc [gn build] Port 7ead5f5aa3 2020-12-10 23:59:49 +00:00
Nico Weber e19d525846 [gn build] fix up arm64 builtin sources a bit
The fp_mode.c removal is done by filter_builtin_sources in the cmake build.
2020-12-10 16:22:48 -05:00
Nico Weber 0e72f1978d [gn build] only build iOS builtins with full Xcode
Commandline tools doesn't include the iOS SDK.
2020-12-10 16:22:31 -05:00
Nico Weber c9235180d1 [gn build] add a missing dependency 2020-12-10 16:22:26 -05:00
LLVM GN Syncbot 57db6d20c6 [gn build] Port ea6641085d 2020-12-10 19:09:35 +00:00
LLVM GN Syncbot ed4783fc59 [gn build] Port b035513c06 2020-12-10 17:56:12 +00:00
Nico Weber 985739ec05 [gn build] fix build after a7b2847216
Ports 6e42a417ba since it's now needed, and undo an accidental
deletion from d69762c404 while here (this part is not needed to fix
the build, it's just in the vicinity).
2020-12-10 10:28:48 -05:00
LLVM GN Syncbot 426bee7ad7 [gn build] Port f80b29878b 2020-12-10 09:13:09 +00:00
LLVM GN Syncbot 2caafac039 [gn build] Port f5d07a05bb 2020-12-09 23:12:27 +00:00
LLVM GN Syncbot cff1f4cbbc [gn build] Port b804eef090 2020-12-09 16:19:07 +00:00
LLVM GN Syncbot da1392e1b9 [gn build] Port ac7864ec01 2020-12-09 16:19:07 +00:00
LLVM GN Syncbot d75791ec1e [gn build] Port 5934a79196 2020-12-09 16:19:06 +00:00
LLVM GN Syncbot abd80ac9b8 [gn build] Port 39431e479f 2020-12-08 20:15:45 +00:00
LLVM GN Syncbot bf14979e34 [gn build] Port 1821265db6 2020-12-08 20:15:44 +00:00
Arthur Eubanks bf30d7de76 [gn build] Move ScalarizeMaskedMemIntrin.cpp 2020-12-08 11:33:45 -08:00
Nico Weber 9935b0fc90 [gn build] (manually) port db61b1844e 2020-12-08 11:45:43 -05:00
LLVM GN Syncbot d1c14dd0fc [gn build] Port 6b989a1710 2020-12-06 20:12:22 +00:00
Duncan P. N. Exon Smith d126943251 Index: Remove unused internal header SimpleFormatContext.h, NFC
Looks like nothing has included this header since
d21485d2f5 / r286279 in 2016. Delete the
dead code.
2020-12-04 15:10:27 -08:00
LLVM GN Syncbot 76f785ae78 [gn build] Port 4d8bf870a8 2020-12-04 22:16:56 +00:00
LLVM GN Syncbot 3898d98bd0 [gn build] Port c8ec685ca5 2020-12-04 15:06:48 +00:00
Arthur Eubanks 2f0de58294 [NewPM] Support --print-before/after in NPM
This changes --print-before/after to be a list of strings rather than
legacy passes. (this also has the effect of not showing the entire list
of passes in --help-hidden after --print-before/after, which IMO is
great for making it less verbose).

Currently PrintIRInstrumentation passes the class name rather than pass
name to llvm::shouldPrintBeforePass(), meaning
llvm::shouldPrintBeforePass() never functions as intended in the NPM.
There is no easy way of converting class names to pass names outside of
within an instance of PassBuilder.

This adds a map of pass class names to their short names in
PassRegistry.def within PassInstrumentationCallbacks. It is populated
inside the constructor of PassBuilder, which takes a
PassInstrumentationCallbacks.

Add a pointer to PassInstrumentationCallbacks inside
PrintIRInstrumentation and use the newly created map.

This is a bit hacky, but I can't think of a better way since the short
id to class name only exists within PassRegistry.def. This also doesn't
handle passes not in PassRegistry.def but rather added via
PassBuilder::registerPipelineParsingCallback().

llvm/test/CodeGen/Generic/print-after.ll doesn't seem very useful now
with this change.

Reviewed By: ychen, jamieschmeiser

Differential Revision: https://reviews.llvm.org/D87216
2020-12-03 16:52:14 -08:00
Mehdi Amini 6cd9608fb3 Revert "Switch to std::is_trivially_move_constructible and std::is_trivially_copy_constructible"
This reverts commit c8d406c93c.

Builds are broken with some versions of GCC.
2020-12-03 19:58:06 +00:00
LLVM GN Syncbot d69762c404 [gn build] Port 2020-12-03 18:47:31 +00:00
Nico Weber df8a79258f [gn build] (semi-manually) port cc8df90b03 2020-12-03 13:43:19 -05:00
Nico Weber 498693a7b5 [gn build] (manually) port 65049d1610 2020-12-03 13:43:19 -05:00
Fangrui Song c8d406c93c Switch to std::is_trivially_move_constructible and std::is_trivially_copy_constructible
Differential Revision: https://reviews.llvm.org/D92543
2020-12-03 09:15:40 -08:00
Reid Kleckner 91e66bfd32 Revert "Use std::is_trivially_copyable", breaks MSVC build
Revert "Delete llvm::is_trivially_copyable and CMake variable HAVE_STD_IS_TRIVIALLY_COPYABLE"

This reverts commit 4d4bd40b57.

This reverts commit 557b00e0af.
2020-12-02 14:30:46 -08:00
LLVM GN Syncbot 327af6aa60 [gn build] Port 24d4291ca7 2020-12-02 21:52:41 +00:00
LLVM GN Syncbot e5085a62d1 [gn build] Port a65d8c5d72 2020-12-02 18:50:30 +00:00
Fangrui Song 557b00e0af Delete llvm::is_trivially_copyable and CMake variable HAVE_STD_IS_TRIVIALLY_COPYABLE
GCC<5 did not support std::is_trivially_copyable. Now LLVM builds
require 5.1 we can delete llvm::is_trivially_copyable after the users
have been migrated to std::is_trivially_copyable.
2020-12-02 09:58:08 -08:00
Hans Wennborg 437c465385 [ThinLTO] Import symver directives for imported symbols (PR48214)
When importing symbols from another module, also import any
corresponding symver directives.

Differential revision: https://reviews.llvm.org/D92335
2020-12-02 14:56:43 +01:00
LLVM GN Syncbot e8b816ad19 [gn build] Port 3fcb0eeb15 2020-12-01 23:11:06 +00:00
Arthur Eubanks ec13b39117 [gn build] Format all gn files
$ git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
2020-12-01 15:07:16 -08:00
Arthur Eubanks ea7b07187b [gn build] Manually port 8fee2ee9 2020-12-01 15:06:49 -08:00
Nico Weber ba4e45a0aa [gn build] (manually) port 8fee2ee9a6 2020-12-01 18:02:27 -05:00
Arthur Eubanks aafb366210 Reland [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/
This allows us to use its value everywhere, rather than just clang. Some
other places, like opt and lld, will use its value soon.

Rename it internally to LLVM_ENABLE_NEW_PASS_MANAGER.

The #define for it is now in llvm-config.h.

The initial land accidentally set the value of
LLVM_ENABLE_NEW_PASS_MANAGER to the string
ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER instead of its value.

Reviewed By: rnk, hans

Differential Revision: https://reviews.llvm.org/D92072
2020-12-01 14:00:32 -08:00
Arthur Eubanks 806a76c001 Revert "[CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/"
The new pass manager was accidentally enabled by default with this change.

This reverts commit a36bd4c90d.
2020-12-01 13:12:12 -08:00
Arthur Eubanks a36bd4c90d [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/
This allows us to use its value everywhere, rather than just clang. Some
other places, like opt and lld, will use its value soon.

The #define for it is now in llvm-config.h.

Reviewed By: rnk, hans

Differential Revision: https://reviews.llvm.org/D92072
2020-12-01 11:42:17 -08:00
Nico Weber cacb1a9f93 [gn build] sync script: try to make sync script even clearer
Turns out startswith() takes an optional start parameter :)

No behavior change.
2020-12-01 14:35:27 -05:00
Hans Wennborg 52f3fac224 [gn build] Manually merge 40659cd 2020-12-01 11:15:05 +01:00
Nico Weber 61da501b6a clang/test: Remove platform-linker feature
By explicitly requesting the system linker with `-fuse-ld=`, the
tests are able to CHECK for the system linker even with
CLANG_DEFAULT_LINKER=lld.

Alternative to D74704.

Differential Revision: https://reviews.llvm.org/D92291
2020-11-30 20:00:46 -05:00
LLVM GN Syncbot a4064cbf32 [gn build] Port 64fa8cce22 2020-11-30 18:20:24 +00:00
Hans Wennborg 13c42f4ca7 [gn build] Manually sync 8da7efb and cac5be4
This adds the clang-tidy concurrency module to the gn build.
2020-11-30 13:37:45 +01:00
LLVM GN Syncbot 88974e829e [gn build] Port a8a43b6338 2020-11-28 01:56:55 +00:00
LLVM GN Syncbot cbc8c1eb48 [gn build] Port bf899e8913 2020-11-28 01:09:33 +00:00
Nico Weber 43afba0677 [gn build] sync script: try to make a loop clearer
We want to find 'sources = [', but only if it's not the prefix
of 'sources = []' -- we're looking for a non-empty list.

No behavior change.
2020-11-25 21:16:22 -05:00
Nico Weber 12c2646feb [gn build] sync script: only compute tokloc when adding files
No behavior change, but maybe a bit clearer.
2020-11-25 21:05:13 -05:00
Nico Weber 48d1017245 [gn build] sync script: handle multiple source lists if only deleting
With this, changes like b534beabee can be merged automatically.
2020-11-25 20:57:55 -05:00
Nico Weber da0aaedcd0 [gn build] (manually) port b534beabee 2020-11-25 20:19:46 -05:00
LLVM GN Syncbot 54038eeef4 [gn build] Port 73fdd99870 2020-11-25 18:35:53 +00:00
Nico Weber 9595a7ff55 [gn build] Download prebuilt mac-arm64 binary now that it exists
Sadly requires an ugly workaround for an ugly bug, but still nicer than
building locally.
2020-11-25 12:08:48 -05:00
LLVM GN Syncbot 1c3451c665 [gn build] Port d95db1693c 2020-11-25 11:13:15 +00:00
LLVM GN Syncbot 73c181cf3a [gn build] Port 8d06a678a5 2020-11-24 22:27:19 +00:00
Nico Weber c8414fa941 lld: Fix darwinnew symlink name added in e16c0a9a68 2020-11-24 11:06:51 -05:00
Nico Weber e16c0a9a68 clang+lld: Improve clang+ld.darwinnew.lld interaction, pass -demangle
This patch:
- adds an ld64.lld.darwinnew symlink for lld, to go with f2710d4b57,
  so that `clang -fuse-ld=lld.darwinnew` can be used to test new
  Mach-O lld while it's in bring-up. (The expectation is that we'll
  remove this again once new Mach-O lld is the defauld and only Mach-O
  lld.)
- lets the clang driver know if the linker is lld (currently
  only triggered if `-fuse-ld=lld` or `-fuse-ld=lld.darwinnew` is
  passed). Currently only used for the next point, but could be used
  to implement other features that need close coordination between
  compiler and linker, e.g. having a diag for calling `clang++` instead
  of `clang` when link errors are caused by a missing C++ stdlib.
- lets the clang driver pass `-demangle` to Mach-O lld (both old and
  new), in addition to ld64
- implements -demangle for new Mach-O lld
- changes demangleItanium() to accept _Z, __Z, ___Z, ____Z prefixes
  (and updates one test added in D68014). Mach-O has an extra
  underscore for symbols, and the three (or, on Mach-O, four)
  underscores are used for block names.

Differential Revision: https://reviews.llvm.org/D91884
2020-11-24 08:51:58 -05:00
Nico Weber 9194aa8867 [gn build] modify hotfix in 17df195f70 to work with all enabled targets
llvm-config output with the gn build is just good enough to make
tests pass, but llvm-config wants all .a files it knows about to
actually exist. So let it know about fewer .a files that don't
exist if not all targets are enabled.
2020-11-23 21:28:54 -05:00
LLVM GN Syncbot 53310ae708 [gn build] Port 3e6e6a2db6 2020-11-24 01:44:50 +00:00
LLVM GN Syncbot a1c342bf11 [gn build] Port f6b02ecd02 2020-11-23 21:33:46 +00:00
Reid Kleckner 64802d48d5 Make check-clang depend on the LLVM split-file utility
Fixes a recently added test that has this dependency. IMO this utility
is generally useful, so we should go ahead and take the new dependency.
2020-11-23 12:21:44 -08:00
Nico Weber 47eb5ce19a [mac/arm] fix clang/test/Driver/darwin-ld-dedup.c
The test needs an object file, which it currenty gets with
`-target x86_64-apple-darwin10`.  Rather than adding `REQUIRES: X86`, create
the object file via yaml2obj. This way, the test runs and passes even if the
host arch isn't x86 and only the host arch is built.

Part of PR46644.
2020-11-23 13:32:29 -05:00
Nico Weber 191117cec5 [gn build] (manually) port ed424b428 2020-11-22 16:19:59 -05:00
LLVM GN Syncbot 8c5d751b72 [gn build] Port 067ffbfe60 2020-11-22 21:09:32 +00:00
Nico Weber 6a9d05a0a2 [gn build] sort of merge 37ac559fcc
It'd be nicer if there was a group target that forwarded either to
//clang-tools-extra/clangd/index/remote or
//clangd/index/remote/unimplemented based on if remote index is enabled,
but for now it's never enabled in the gn build.
2020-11-22 16:07:35 -05:00
LLVM GN Syncbot d730e611e6 [gn build] Port 8adc4d1ec7 2020-11-20 00:15:31 +00:00
Nico Weber a8d9d0bd8a [gn build] (manually) merge 1fb91fcf9c 2020-11-19 14:24:35 -05:00
Nico Weber 5824a572ad [gn build] (manually) merge f0785c1f7a 2020-11-18 17:17:01 -05:00
Nico Weber 27e73816d6 lld: Make tests depend on llvm-symbolizer after bc98034040
Fixes test failures when building just `check-lld` in a clean build dir.
2020-11-18 11:43:44 -05:00
LLVM GN Syncbot 2b9a708491 [gn build] Port 6a89cb8136 2020-11-18 03:04:01 +00:00
LLVM GN Syncbot 39f1eeb07d [gn build] Port 41bcc05e2a 2020-11-18 02:45:24 +00:00
Arthur Eubanks 67e0f791c9 [gn build] Use forward slashes for goma directory
gn generates improper compile_commands.json files by not escaping
backslashes.
2020-11-17 17:10:36 -08:00
LLVM GN Syncbot e5d2409689 [gn build] Port f8f6d6455f 2020-11-18 00:02:29 +00:00
LLVM GN Syncbot b2613fb2f0 [gn build] Port 8fb4417d82 2020-11-17 21:45:53 +00:00
Amy Huang bc98034040 [llvm-symbolizer] Add inline stack traces for Windows.
This adds inline stack frames for symbolizing on Windows.

Differential Revision: https://reviews.llvm.org/D88988
2020-11-17 13:19:13 -08:00