1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
Commit Graph

2026 Commits

Author SHA1 Message Date
LLVM GN Syncbot
2c7e558308 [gn build] Port 403e67d34d03 2021-07-21 00:19:59 +00:00
LLVM GN Syncbot
a36faebe1f [gn build] Port 808bbc2c4702 2021-07-20 21:53:24 +00:00
LLVM GN Syncbot
e479de9d16 [gn build] Port 05a6d74c4845 2021-07-20 20:51:01 +00:00
LLVM GN Syncbot
83266a3de4 [gn build] Port 1a29403d2f8a 2021-07-20 15:13:51 +00:00
Nico Weber
3a0fbebf9d [gn build] remove stray character in a comment 2021-07-20 10:13:48 -04:00
LLVM GN Syncbot
bcb32ee85a [gn build] Port 2b08f6af62af 2021-07-20 12:00:01 +00:00
Nico Weber
125ab5ca8a [gn build] (manually) port bc1a2979fc70 2021-07-20 06:43:30 -04:00
LLVM GN Syncbot
733b3890af [gn build] Port adb55d7c3265 2021-07-20 05:51:14 +00:00
Nico Weber
4ebc105ec1 [gn build] Fix llvm_build_instrumented_coverage=true builds with goma/rbe 2021-07-19 19:57:02 -04:00
LLVM GN Syncbot
3b84d5a91c [gn build] Port 08b289867b5a 2021-07-19 21:33:24 +00:00
LLVM GN Syncbot
851946ccb9 [gn build] Port 54902e00d128 2021-07-19 19:24:16 +00:00
LLVM GN Syncbot
d722d088d8 [gn build] Port 8b4acb067fd3 2021-07-19 18:24:11 +00:00
LLVM GN Syncbot
0194fd0275 [gn build] Port 61fa9afe4c5b 2021-07-19 18:24:10 +00:00
LLVM GN Syncbot
644dc4b472 [gn build] Port 6103fdfab4e2 2021-07-19 18:24:09 +00:00
Haowei Wu
5403a31116 [ifs][elfabi] Merge llvm-ifs/elfabi tools
This change merges llvm-elfabi and llvm-ifs tools.

Differential Revision: https://reviews.llvm.org/D100139
2021-07-19 11:23:19 -07:00
Whisperity
c4c95813ae [clang-tidy] Add 'readability-suspicious-call-argument' check
Finds function calls where the call arguments might be provided in an
incorrect order, based on the comparison (via string metrics) of the
parameter names and the argument names against each other.

A diagnostic is emitted if an argument name is similar to a *different*
parameter than the one currently passed to, and it is sufficiently
dissimilar to the one it **is** passed to currently.

False-positive warnings from this check are useful to indicate bad
naming convention issues, even if a swap isn't necessary.
This check does not generate FixIts.

Originally implemented by @varjujan as his Master's Thesis work.
The check was subsequently taken over by @barancsuk who added type
conformity checks to silence false positive matches.
The work by @whisperity involved driving the check's review and fixing
some more bugs in the process.

Reviewed By: aaron.ballman, alexfh

Differential Revision: http://reviews.llvm.org/D20689

Co-authored-by: János Varjú <varjujanos2@gmail.com>
Co-authored-by: Lilla Barancsuk <barancsuklilla@gmail.com>
2021-07-19 10:18:09 +02:00
LLVM GN Syncbot
f738f3fd22 [gn build] Port 0bf4b81d57b0 2021-07-16 20:32:47 +00:00
Nico Weber
1fea8de18b [gn build] (semi-manually) port 6a4054ef060b 2021-07-16 15:54:13 -04:00
LLVM GN Syncbot
79801693ba [gn build] Port 766a08df12c1 2021-07-16 02:23:45 +00:00
Nico Weber
1cc643bb34 [gn build] port 766a08df12c1 2021-07-15 22:23:14 -04:00
Ilya Leoshkevich
3a1b644428 [TSan] Add SystemZ longjmp support
Implement the interceptor and stack pointer demangling.

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D105629
2021-07-15 12:18:48 +02:00
LLVM GN Syncbot
091d61e196 [gn build] Port b0d38ad0bc25 2021-07-15 07:50:35 +00:00
LLVM GN Syncbot
9865f77f6d [gn build] Port b9c3941cd61d 2021-07-15 01:12:36 +00:00
Djordje Todorovic
c793732c01 [RemoveRedundantDebugValues] Add a Pass that removes redundant DBG_VALUEs
This new MIR pass removes redundant DBG_VALUEs.

After the register allocator is done, more precisely, after
the Virtual Register Rewriter, we end up having duplicated
DBG_VALUEs, since some virtual registers are being rewritten
into the same physical register as some of existing DBG_VALUEs.
Each DBG_VALUE should indicate (at least before the LiveDebugValues)
variables assignment, but it is being clobbered for function
parameters during the SelectionDAG since it generates new DBG_VALUEs
after COPY instructions, even though the parameter has no assignment.
For example, if we had a DBG_VALUE $regX as an entry debug value
representing the parameter, and a COPY and after the COPY,
DBG_VALUE $virt_reg, and after the virtregrewrite the $virt_reg gets
rewritten into $regX, we'd end up having redundant DBG_VALUE.

This breaks the definition of the DBG_VALUE since some analysis passes
might be built on top of that premise..., and this patch tries to fix
the MIR with the respect to that.

This first patch performs bacward scan, by trying to detect a sequence of
consecutive DBG_VALUEs, and to remove all DBG_VALUEs describing one
variable but the last one:

For example:

(1) DBG_VALUE $edi, !"var1", ...
(2) DBG_VALUE $esi, !"var2", ...
(3) DBG_VALUE $edi, !"var1", ...
 ...

in this case, we can remove (1).

By combining the forward scan that will be introduced in the next patch
(from this stack), by inspecting the statistics, the RemoveRedundantDebugValues
removes 15032 instructions by using gdb-7.11 as a testbed.

Differential Revision: https://reviews.llvm.org/D105279
2021-07-14 04:29:42 -07:00
LLVM GN Syncbot
b00ffab852 [gn build] Port c08dabb0f476 2021-07-14 10:49:08 +00:00
Nico Weber
0eb0133948 [gn build] (manually) merge 462d4de35b0c 2021-07-14 06:43:23 -04:00
Nico Weber
fa89c8064f [gn build] (manually) port 303ddb60a2d2 2021-07-13 15:15:38 -04:00
Fangrui Song
601cf9f2c4 [llvm-readobj] Switch command line parsing from llvm::cl to OptTable
Users should generally observe no difference as long as they don't use
unintended option forms. Behavior changes:

* `-t=d` is removed. Use `-t d` instead.
* `--demangle=false` and `--demangle=0` cannot be used. Omit the option or use `--no-demangle`. Other flag-style options don't have `--no-` forms.
* `--help-list` is removed. This is a `cl::` specific option.
* llvm-readobj now supports grouped short options as well.
* `--color` is removed. This is generally not useful (only apply to errors/warnings) but was inherited from Support.

Some adjustment to the canonical forms
(usually from GNU readelf; currently llvm-readobj has too many redundant aliases):

* --dyn-syms is canonical. --dyn-symbols is a hidden alias
* --file-header is canonical. --file-headers is a hidden alias
* --histogram is canonical. --elf-hash-histogram is a hidden alias
* --relocs is canonical. --relocations is a hidden alias
* --section-groups is canonical. --elf-section-groups is a hidden alias

OptTable avoids global option collision if we decide to support multiplexing for binary utilities.

* Most one-dash long options are still supported. `-dt, -sd, -st, -sr` are dropped due to their conflict with grouped short options.
* `--section-mapping=false` (D57365) is strange but is kept for now.
* Many `cl::opt` variables were unnecessarily external. I added `static` whenever appropriate.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105532
2021-07-12 10:14:42 -07:00
Nico Weber
6e8807b3fb [gn build] port 0da172b1766e more 2021-07-12 08:50:18 -04:00
Nico Weber
a7f8451294 [gn build] (semi-manually) port 0da172b1766e 2021-07-12 08:15:59 -04:00
Nico Weber
fb62f3051e [gn build] fix formatting after 9647a6f719ee 2021-07-09 19:04:46 -04:00
Wouter van Oortmerssen
538b137e0b [WebAssembly] Added initial type checker to MC Assembler
This to protect against non-sensical instruction sequences being assembled,
which would either cause asserts/crashes further down, or a Wasm module being output that doesn't validate.

Unlike a validator, this type checker is able to give type-errors as part of the parsing process, which makes the assembler much friendlier to be used by humans writing manual input.

Because the MC system is single pass (instructions aren't even stored in MC format, they are directly output) the type checker has to be single pass as well, which means that from now on .globaltype and .functype decls must come before their use. An extra pass is added to Codegen to collect information for this purpose, since AsmPrinter is normally single pass / streaming as well, and would otherwise generate this information on the fly.

A `-no-type-check` flag was added to llvm-mc (and any other tools that take asm input) that surpresses type errors, as a quick escape hatch for tests that were not intended to be type correct.

This is a first version of the type checker that ignores control flow, i.e. it checks that types are correct along the linear path, but not the branch path. This will still catch most errors. Branch checking could be added in the future.

Differential Revision: https://reviews.llvm.org/D104945
2021-07-09 14:07:25 -07:00
Fangrui Song
c63038b191 [llvm-size] Switch command line parsing from llvm::cl to OptTable
Part of https://lists.llvm.org/pipermail/llvm-dev/2021-July/151622.html
"Binary utilities: switch command line parsing from llvm::cl to OptTable"

* `--totals=false` and `--totals=0` cannot be used. Omit the option.
* `--help-list` is removed. This is a `cl::` specific option.

OptTable avoids global option collision if we decide to support multiplexing for binary utilities.

Note: because the tool is simple, and its long options are uncommon, I just drop
the one-dash forms except `-arch <value>` (Darwin style).

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105598
2021-07-09 10:26:53 -07:00
LLVM GN Syncbot
bb1eadd237 [gn build] Port 0e09a41b415b 2021-07-09 17:14:37 +00:00
Fangrui Song
6c0a5fae66 [llvm-cxxfilt] Switch command line parsing from llvm::cl to OptTable
Similar to D104889. The tool is very simple and its long options are uncommon,
so just drop the one-dash form in this patch.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105605
2021-07-09 10:10:45 -07:00
LLVM GN Syncbot
a3b5c3bb94 [gn build] Port 321c2ea91cb1 2021-07-08 15:35:54 +00:00
Nico Weber
11944c0204 [gn build] (manually) port ef16c8eaa5cd5679759 (MCACustomBehaviorAMDGPU) 2021-07-07 21:59:07 -04:00
Nico Weber
cde6b35842 [gn build] (semi-manually) port 966386514bec 2021-07-07 19:27:19 -04:00
Fangrui Song
3586ecfc1a [llvm-nm] Switch command line parsing from llvm::cl to OptTable
Part of https://lists.llvm.org/pipermail/llvm-dev/2021-July/151622.html
"Binary utilities: switch command line parsing from llvm::cl to OptTable"

Users should generally observe no difference as long as they only use intended
option forms. Behavior changes:

* `-t=d` is removed. Use `-t d` instead.
* `--demangle=0` cannot be used. Omit the option or use `--no-demangle` instead.
* `--help-list` is removed. This is a `cl::` specific option.

Note:

* `-t` diagnostic gets improved.
* This patch avoids cl::opt collision if we decide to support multiplexing for binary utilities
* One-dash long options are still supported.
* The `-s` collision (`-s segment section` for Mach-O) is unfortunate. `-s` means `--print-armap` in GNU nm.
* This patch removes the last `cl::multi_val` use case from the `llvm/lib/Support/CommandLine.cpp` library

`-M` (`--print-armap`), `-U` (`--defined-only`), and `-W` (`--no-weak`)
are now deprecated. They could conflict with future GNU nm options.
(--print-armap has an existing alias -s, so GNU will unlikely add a new one.
--no-weak (not in GNU nm) is rarely used anyway.)

`--just-symbol-name` is now deprecated in favor of
`--format=just-symbols` and `-j`.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105330
2021-07-07 13:34:33 -07:00
LLVM GN Syncbot
a67e94b8ca [gn build] Port 6829db727e9e 2021-07-07 10:14:59 +00:00
LLVM GN Syncbot
7ae669846a [gn build] Port 8517a26d442f 2021-07-06 18:17:43 +00:00
Nico Weber
27befb62e0 [gn build] (manually) port 98f078324fc5 (llvm-strings Opts.td) 2021-07-05 14:43:05 -04:00
LLVM GN Syncbot
15c9cd07da [gn build] Port 99f00635d7ac 2021-07-02 17:03:49 +00:00
LLVM GN Syncbot
18f6051a4c [gn build] Port bf64210fd88f 2021-07-02 16:12:54 +00:00
Sam McCall
f01feb00be Revert "[clangd] Unbreak mac build differently 0c96a92d8666b8"
This reverts commit 2f79acb7b701c41494abff588b5f03a74ea2e11d.

Should no longer be needed after 26e1553a107f52667be879e99739a4153f8799d8
2021-07-02 16:29:48 +02:00
LLVM GN Syncbot
62f1d32559 [gn build] Port a92964779cb5 2021-07-02 13:05:44 +00:00
LLVM GN Syncbot
a3a9d61236 [gn build] Port 33a7b4d9d8e6 2021-07-01 22:26:09 +00:00
Nico Weber
856c1b08d5 [gn build] Port 050b064f15ee 2021-07-01 14:52:21 -04:00
Nico Weber
394ac62585 [clangd] Unbreak mac build differently 0c96a92d8666b8
This reverts b56e5f8a10c1 (and follow-up f6db88535cb) and instead
restores the state we had before 0c96a92d8666b8: ClangdMain.cpp
includes Features.inc before including Transport.h.

This is a bit ugly, but it matches the former state and making Transport.h
include Features.h means that xpc/ needs to be able to find the generated
Features.inc, wich is also a bit ugly.
2021-07-01 10:51:27 -04:00
LLVM GN Syncbot
81673f2df8 [gn build] Port 39f64c4c8375 2021-07-01 08:31:00 +00:00