Commit Graph

1762 Commits

Author SHA1 Message Date
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
LLVM GN Syncbot 07927ac675 [gn build] Port 8dbe44cb29 2020-11-16 14:58:16 +00:00
Nico Weber c0538938c9 [gn build] (manually) merge e51631ca4c 2020-11-14 10:12:15 -05:00
Roman Lebedev 6861d938e5
Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
See discussion in https://bugs.llvm.org/show_bug.cgi?id=45073 / https://reviews.llvm.org/D66324#2334485
the implementation is known-broken for certain inputs,
the bugreport was up for a significant amount of timer,
and there has been no activity to address it.
Therefore, just completely rip out all of misexpect handling.

I suspect, fixing it requires redesigning the internals of MD_misexpect.
Should anyone commit to fixing the implementation problem,
starting from clean slate may be better anyways.

This reverts commit 7bdad08429,
and some of it's follow-ups, that don't stand on their own.
2020-11-14 13:12:38 +03:00
Arthur Eubanks df84941dce [gn build] Port 8741a76f 2020-11-13 09:17:52 -08:00
Nico Weber c80d52e651 [gn build] (semi-manually) Port 6a8099e0f6 2020-11-13 11:20:23 -05:00
Nico Weber ffaa859b72 [gn build] more hotfix after 17df195f70 to unbreak llvm-config tests 2020-11-13 10:03:05 -05:00
Nico Weber 7eba8ebf88 [gn build] Port 8bb6347939 2020-11-13 09:55:24 -05:00
Nico Weber d86f07888a [gn build] (manually) merge 1d0676b54c 2020-11-13 09:41:19 -05:00
Nico Weber 17df195f70 [gn build] Hotfix to unbreak build after 9218ff50f9 2020-11-13 09:26:43 -05:00
Nico Weber fa9f41330d [gn build] (manually) port 410626c9b5 2020-11-12 18:21:22 -05:00
Nico Weber 9a8fad2a89 Revert "[gn build] (semi-manually) port 173b51169b8"
This reverts commit 37a1336de7.
173b51169b was reverted in 777ca48.
2020-11-12 13:54:24 -05:00
Nico Weber 37a1336de7 [gn build] (semi-manually) port 173b51169b 2020-11-12 12:18:27 -05:00
LLVM GN Syncbot b304025acf [gn build] Port 250de7388b 2020-11-11 14:04:25 +00:00
Nico Weber 420acc8414 [gn build] (manually) port 98aa067109 2020-11-11 08:40:13 -05:00
Nico Weber 641bead10e [gn build] (semi-manually) Port 454579e46a 2020-11-11 08:40:13 -05:00
Nico Weber c084ff5819 Revert "[gn build] (semi-manually) Port 98aa067109"
This reverts commit 04ce13e497.
The commit message was wrong. Will reland with fixed message.
2020-11-11 08:40:12 -05:00
Nico Weber 04ce13e497 [gn build] (semi-manually) Port 98aa067109 2020-11-11 07:37:15 -05:00
Peter Collingbourne c052510c0b gn build: (manually) Port ae032e27 and 21f83113.
__register_frame and __deregister_frame are associated with the
.eh_frame section, which I think is used on all of our platforms
except Windows and 32-bit ARM (which uses the ARM EHABI).

Also add a file that was added to lld/MachO.
2020-11-10 15:50:40 -08:00
LLVM GN Syncbot 554939583a [gn build] Port dbfa69c502 2020-11-09 23:03:42 +00:00
LLVM GN Syncbot 65c489852c [gn build] Port 9ca6fc4e09 2020-11-09 14:31:09 +00:00
LLVM GN Syncbot 44b2866fca [gn build] Port d725f1ce53 2020-11-07 19:18:18 +00:00
Nico Weber 439b5bebaf [gn build] (manually) port 82f86ae01 more 2020-11-05 14:12:33 -05:00
Nico Weber b69af88481 [gn build] (manually) port 82f86ae01 2020-11-05 14:11:26 -05:00
LLVM GN Syncbot 1ec726f954 [gn build] Port 659f4bd87e 2020-11-05 15:11:13 +00:00
LLVM GN Syncbot 2ce5b8f78c [gn build] Port d1b2a52319 2020-11-04 15:36:49 +00:00
LLVM GN Syncbot beb825168d [gn build] Port 73b6cb67dc 2020-11-04 12:00:24 +00:00
LLVM GN Syncbot 1581331dff [gn build] Port 1124bf4ab7 2020-11-04 12:00:24 +00:00
Nico Weber 5c9d2db42d [gn build] try to port 707d69ff32 2020-11-04 07:00:05 -05:00
Vitaly Buka e86205680e [sanitizer] Remove ANDROID_NDK_VERSION 2020-11-04 01:15:25 -08:00
LLVM GN Syncbot a5bbefe303 [gn build] Port 1667d23e58 2020-11-03 13:58:51 +00:00
Nico Weber 47c95f1710 [gn build] (manually) port 1af3cb5424 2020-11-03 08:58:23 -05:00
LLVM GN Syncbot 31a3aca7f9 [gn build] Port c17da8676a 2020-11-02 18:32:12 +00:00
Nico Weber 9968331a59 [gn build] Run `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format` 2020-11-02 10:49:54 -05:00
Nico Weber 92ba5517a5 [gn build] (manually) port c6eaa14e11 2020-11-02 10:43:38 -05:00
Nico Weber 1260041b3a [gn build] (manually) port 76a168bce0 better 2020-11-02 10:14:58 -05:00
Nico Weber a5b899b3a7 [gn build] (manually) port 76a168bce0 2020-11-02 09:22:44 -05:00
LLVM GN Syncbot 6144dbf09e [gn build] Port 756f597841 2020-10-31 05:19:04 +00:00
LLVM GN Syncbot 5d9c80a6e6 [gn build] Port ac49500cd0 2020-10-30 19:18:17 +00:00
LLVM GN Syncbot d273cb6090 [gn build] Port 940d0a310d 2020-10-30 18:08:01 +00:00
LLVM GN Syncbot a3f38551ef [gn build] Port 84e8257937 2020-10-30 17:54:57 +00:00
Nico Weber 0332e98cb8 [gn build] port e58660750e
Made necessary by c479e0c994, which requires std::timespec
to exist, which it only does in c++17 and later.
2020-10-30 13:49:27 -04:00
LLVM GN Syncbot ed0e367dec [gn build] Port 00090a2b82 2020-10-30 02:36:24 +00:00
Marcel Hlopko 9bb9b737c5 Remove HAVE_VCS_VERSION_INC, not needed
This preprocessor define was meant to be used to conditionally include VCSVersion.inc. However, the define was always set, and it was the content of the header that was conditionally generated. Therefore HAVE_VCS_VERSION_INC should be cleaned up.

Reviewed By: gribozavr2, MaskRay

Differential Revision: https://reviews.llvm.org/D84623
2020-10-29 13:09:05 -07:00
Peter Collingbourne 19cfe5a6de gn build: Define HWASAN_WITH_INTERCEPTORS=1 for hwasan_new_delete.cpp as well. 2020-10-28 15:42:07 -07:00
LLVM GN Syncbot 818bd31906 [gn build] Port 23ed570af1 2020-10-28 20:46:36 +00:00
LLVM GN Syncbot e8c4fd86ce [gn build] Port 23c8da25ef 2020-10-28 13:16:58 +00:00
LLVM GN Syncbot aa45516406 [gn build] Port 47369e194a 2020-10-28 12:31:40 +00:00
LLVM GN Syncbot fa562cb224 [gn build] Port e025d09b21 2020-10-27 19:40:30 +00:00
LLVM GN Syncbot 6495896ede [gn build] Port ce6900c6cb 2020-10-27 19:40:29 +00:00
LLVM GN Syncbot 16ca0037c8 [gn build] Port 46c3d5cb05 2020-10-27 18:08:19 +00:00
LLVM GN Syncbot 2107e4b10e [gn build] Port 850325348a 2020-10-27 12:17:41 +00:00
LLVM GN Syncbot 8000d277ba [gn build] Port 61bc18de0b 2020-10-26 08:07:25 +00:00
Nathan Ridge aaa8b44d19 [clangd] Add a TestWorkspace utility
TestWorkspace allows easily writing tests involving multiple
files that can have inclusion relationships between them.

BackgroundIndexTest.RelationsMultiFile is refactored to use
TestWorkspace, and moved to FileIndexTest as it no longer
depends on BackgroundIndex.

Differential Revision: https://reviews.llvm.org/D89297
2020-10-24 20:15:17 -04:00
Arthur Eubanks 4b90a253c2 [gn build] Add missing comma 2020-10-23 12:01:23 -07:00
Amara Emerson 0f0fd383b4 [AArch64][GlobalISel] Introduce a new post-isel optimization pass.
There are two optimizations here:

1. Consider the following code:
 FCMPSrr %0, %1, implicit-def $nzcv
 %sel1:gpr32 = CSELWr %_, %_, 12, implicit $nzcv
 %sub:gpr32 = SUBSWrr %_, %_, implicit-def $nzcv
 FCMPSrr %0, %1, implicit-def $nzcv
 %sel2:gpr32 = CSELWr %_, %_, 12, implicit $nzcv
This kind of code where we have 2 FCMPs each feeding a CSEL can happen
when we have a single IR fcmp being used by two selects. During selection,
to ensure that there can be no clobbering of nzcv between the fcmp and the
csel, we have to generate an fcmp immediately before each csel is
selected.

However, often we can essentially CSE these together later in MachineCSE.
This doesn't work though if there are unrelated flag-setting instructions
in between the two FCMPs. In this case, the SUBS defines NZCV
but it doesn't have any users, being overwritten by the second FCMP.

Our solution here is to try to convert flag setting operations between
a interval of identical FCMPs, so that CSE will be able to eliminate one.

2. SelectionDAG imported patterns for arithmetic ops currently select the
flag-setting ops for CSE reasons, and add the implicit-def $nzcv operand
to those instructions. However if those impdef operands are not marked as
dead, the peephole optimizations are not able to optimize them into non-flag
setting variants. The optimization here is to find these dead imp-defs and
mark them as such.

This pass is only enabled when optimizations are enabled.

Differential Revision: https://reviews.llvm.org/D89415
2020-10-23 10:18:36 -07:00
LLVM GN Syncbot bf44d3689a [gn build] Port dbbc4f4e22 2020-10-23 17:06:41 +00:00
LLVM GN Syncbot 24a1fe7547 [gn build] Port 00255f4192 2020-10-23 16:19:55 +00:00
Nico Weber 13aff21f0d [gn build] port 48e4b0f (__config_site revert)
This reverts commit b3ca53e142.
This reverts commit 8b7dac81d3.
This reverts commit 37c030f81a.
2020-10-23 09:45:34 -04:00
Nico Weber 3fbf9d10fd [gn build] (semi-manually) port 147b9497e7 2020-10-22 18:19:59 -04:00
Arthur Eubanks af3c51e354 [gn build] Add missing clangd dependencies
Fixes
$ ninja obj/build/rel/gen/clang-tools-extra/clangd/CompletionModel.CompletionModel.obj

Some tablegen include files from clang/include/clang/AST and
clang/include/clang/Sema need to be generated before CompletionModel is
compiled.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D89657
2020-10-22 09:04:30 -07:00
LLVM GN Syncbot 1c3bbdb866 [gn build] Port be39a6fe6f 2020-10-22 09:39:53 +00:00
Nico Weber b3ca53e142 [gn build] try to fix clang build after 37c030f81a
37c030f81a made it so that depending on //libcxx/include
automatically added the copied header dir to the include search path.
For some reason, clang can't build against the copied libcxx headers
(it complains about ldiv_t not being a type). I don't have a mac
to debug right now, but for the clang target this change was
unintentional anyways -- only depend on the copies target, instead
of on the target that also adjusts the include path.
2020-10-21 14:11:18 -04:00
Nico Weber 8b7dac81d3 [gn build] try to fix up deps of __config_site after 37c030f81a 2020-10-21 12:57:50 -04:00
Nico Weber 37c030f81a [gn build] (manually) port 5d796645d6 (libcxx __config change) 2020-10-21 12:54:30 -04:00
Nico Weber 4a8b52b53d [gn build] (manually) port 54fa9ecd30 2020-10-21 12:54:30 -04:00
LLVM GN Syncbot cf9e54ef49 [gn build] Port 848a68a032 2020-10-20 17:56:26 +00:00
Nico Weber 853553f81b [gn build] assert clang-format does not depend on AST, Frontend, Sema at gn time
To catch things like https://reviews.llvm.org/D69854 and
https://reviews.llvm.org/D89708 earlier next time they happen.
2020-10-20 10:23:42 -04:00
Nico Weber f67edf5642 [gn build] belatedly port 3ddac7e563 2020-10-20 10:20:11 -04:00
Nico Weber abef77c3dd [gn build] port a2214757e2 more 2020-10-20 10:20:11 -04:00
LLVM GN Syncbot 672652e833 [gn build] Port c0cdd22c72 2020-10-20 13:20:27 +00:00
LLVM GN Syncbot e572c9ce90 [gn build] Port a2214757e2 2020-10-20 13:20:26 +00:00
Nico Weber db915f296f Revert "Revert "[gn build] (manually) port d09b08919ca""
This reverts commit 6ca3dd9735.
d09b08919c relanded in 53065c543f.
2020-10-20 09:09:30 -04:00
Nico Weber 6ca3dd9735 Revert "[gn build] (manually) port d09b08919ca"
This reverts commit 4d2d287a03.
d09b08919c got reverted in 7ecd60bb70.
2020-10-19 20:01:06 -04:00
LLVM GN Syncbot 5f57d3d480 [gn build] Port 6154c4115c 2020-10-19 04:23:08 +00:00
LLVM GN Syncbot ef77026db3 [gn build] Port 0aec49c853 2020-10-19 04:23:07 +00:00
Nico Weber 4d2d287a03 [gn build] (manually) port d09b08919c 2020-10-18 12:17:55 -04:00
LLVM GN Syncbot 1c54a91d11 [gn build] Port 3d4bba302d 2020-10-16 18:13:18 +00:00
Nico Weber 98e134f5d0 [gn build] (manually) port 3d4bba302d 2020-10-16 14:12:38 -04:00
Nico Weber 6601dfb0b8 [gn bulid] Remove phantom WebAssembly tablegen() calls
Apparenlty I added these in https://reviews.llvm.org/rL350628 but
I'm not sure why. They never existed in the CMake build, and now
they're causing trouble.
2020-10-15 16:14:11 -04:00
LLVM GN Syncbot 76c7a6d6cd [gn build] Port f087597124 2020-10-13 20:50:32 +00:00
LLVM GN Syncbot e2c888f571 [gn build] Port 77bb3ebebb 2020-10-13 19:14:10 +00:00
LLVM GN Syncbot 5f335285c1 [gn build] Port 662ed9e67a 2020-10-13 19:14:09 +00:00
LLVM GN Syncbot bfd9cef70e [gn build] Port b76dc111dd 2020-10-13 17:53:40 +00:00
LLVM GN Syncbot 2af5ea28af [gn build] Port 44b7cf2983 2020-10-13 17:53:39 +00:00
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