Commit Graph

1651 Commits

Author SHA1 Message Date
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