1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
Commit Graph

8587 Commits

Author SHA1 Message Date
Vedant Kumar
4bd1271de2 [llvm-locstats] Fix labels on x-axis of comparison chart
Summary:
This change makes the labels on the x-axis of a comparison chart look
like: "0%", "(0%, 10%)", "[10%, 20%)", and so on.

Previously, each label was the same (a concatenation of all the possible
coverage buckets).

Reviewers: djtodoro

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77155
2020-04-01 10:04:01 -07:00
Julian Lettner
d66362b987 [lit] Refine adoption of argparse --version action
The real work for this was already done by serge-sans-paille [1].
Thanks for this!

[1] 1d4849379f71a0f5d73202a291c0b709f7cafbc5
2020-03-31 16:02:16 -07:00
Fangrui Song
f629307b3a [gn build] Port 03f43b3aca36 2020-03-31 12:09:41 -07:00
Fangrui Song
e90f44b7eb [lld][COFF][ELF][WebAssembly] Replace --[no-]threads /threads[:no] with --threads={1,2,...} /threads:{1,2,...}
--no-threads is a name copied from gold.
gold has --no-thread, --thread-count and several other --thread-count-*.

There are needs to customize the number of threads (running several lld
processes concurrently or customizing the number of LTO threads).
Having a single --threads=N is a straightforward replacement of gold's
--no-threads + --thread-count.

--no-threads is used rarely. So just delete --no-threads instead of
keeping it for compatibility for a while.

If --threads= is specified (ELF,wasm; COFF /threads: is similar),
--thinlto-jobs= defaults to --threads=,
otherwise all available hardware threads are used.

There is currently no way to override a --threads={1,2,...}. It is still
a debate whether we should use --threads=all.

Reviewed By: rnk, aganea

Differential Revision: https://reviews.llvm.org/D76885
2020-03-31 08:46:12 -07:00
LLVM GN Syncbot
9f0c2e4c39 [gn build] Port 154d517bc7d 2020-03-31 14:11:06 +00:00
Guillaume Chatelet
58e1dd33cd [Alignment][NFC] Transitionning more getMachineMemOperand call sites
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: arsenm, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jrtc27, atanasyan, Jim, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77121
2020-03-31 08:36:18 +00:00
LLVM GN Syncbot
2dd2846ece [gn build] Port 581ba35291a 2020-03-31 08:26:13 +00:00
Julian Lettner
ce57305010 [lit] Fix test that relied on "single process" mode
The shtest-inject test relied on being executed in "single process" mode
and started to fail with a `PicklingError` after it was removed:
```
  Can't pickle <class 'lit.TestingConfig.CustomFormat'>: attribute
  lookup lit.TestingConfig.CustomFormat failed
```

This happened because the test config has to be serialized to the worker
process, but apparently the `CustomFormat` class defined inline is not
serializable.

This change allows passing the tested functionality (preamble_commands)
directly to `lit.formats.ShTest` so we can use it directly in the test.
2020-03-30 21:58:48 -07:00
Julian Lettner
ba171cfc9a [lit] Remove single process mode
Remove the "serial run" abstraction which bypasses Python's
`multiprocessing.Pool` and instead directly runs tests without spawning
worker processes.  This abstraction has not offered the benefits I hoped
it would and therefore does not carry its weight.
2020-03-30 21:58:48 -07:00
Julian Lettner
1853af1a9e [lit] Send back whole lit.Test object from worker process
In previous commits [1,2] I changed worker.py to only send back the test
result from the worker process instead of the whole test object.  This
was a mistake.  lit.Test contains fields (e.g., xfials, requires,
unsupported) that are only populated when we actually execute the test,
but are queried when we report the results in the parent process.  This
commit essentially reverts the following changes:

[1] a3d2f9b53ac006cb972b61b0dbfcb5babe4356bf
[2] 17bb660fb83e869652ac87b145b0e26b708aab60
2020-03-30 21:58:48 -07:00
Nico Weber
c11ec4e047 [gn build] re-run "gn format" on all .gn and .gni files 2020-03-30 22:15:26 -04:00
Nico Weber
01032409de [gn build] minor tweaks to sync script
- only complain about duplicate 'sources' lines if they contain
  more than 1 elements each (before, 0 and 1 element lists were
  counted too). In practice, this only has an effect for
  clang/lib/Headers/BUILD.gn

- make the '# NOSORT' diag actually work. This too only affects
  clang/lib/Headers/BUILD.gn.

In aggregate, changes to clang/lib/Headers/BUILD.gn still can't
be auto-merged, but for a slighly better reason.
2020-03-30 22:07:23 -04:00
Nico Weber
81ff48fed3 [gn build] (manually) ort 5074776de47 2020-03-30 22:06:36 -04:00
Julian Lettner
245d123cd8 [lit] Use Python's support for None in array slice indexing 2020-03-30 12:44:03 -07:00
Nico Weber
ae71f17f3f fix a comment grammar-o 2020-03-30 14:40:15 -04:00
LLVM GN Syncbot
737fd97ee6 [gn build] Port 3cbbded68c2 2020-03-30 18:16:33 +00:00
Nico Weber
6fbcc674fe Move CLANG_SYSTEMZ_DEFAULT_ARCH to config.h.
Instead of using a global define; see comments on D75914.

While here, port 9c9d88d8b1b to the GN build.
2020-03-30 14:16:17 -04:00
LLVM GN Syncbot
cf4881fd2f [gn build] Port 854f268ca62 2020-03-29 19:24:34 +00:00
Benjamin Kramer
4c79d49be9 [MC] Move deprecation infos from MCTargetDesc to MCInstrInfo
This allows emitting it only when the feature is used by a target.
Shrinks Release+Asserts clang by 900k.
2020-03-29 21:20:40 +02:00
Julian Lettner
2723dcfb82 [lit] Avoid global imports in module declaration
A previous attempt to cleanup module imports broke installing via
pip/setup.py [1].  This should be fixed now.

[1] cf252240e8819d0c90a5e10f773078bdeba33e44

Reviewed By: paquette

Differential Revision: https://reviews.llvm.org/D76940
2020-03-27 12:07:19 -07:00
LLVM GN Syncbot
3baf20f55c [gn build] Port d60d7d69de9 2020-03-27 16:07:06 +00:00
Louis Dionne
c0a8592f8a [lit] NFC: Move the flaky test logic to _runShTest
This minor refactoring allows reducing the amount of processing that
is duplicated when we re-run a flaky test. It also has the nice
side effect that libc++'s current test format supports flaky .sh.cpp
tests, because those are built on top of _runShTest, not executeShTest.
2020-03-27 09:32:58 -04:00
Louis Dionne
eef1e9e29f [lit] Recursively expand substitutions
This allows defining substitutions in terms of other substitutions. For
example, a %build substitution could be defined in terms of a %cxx
substitution as '%cxx %s -o %t.exe' and the script would be properly
expanded.

Differential Revision: https://reviews.llvm.org/D76178
2020-03-27 09:25:26 -04:00
Fangrui Song
9b4e24b4ac [MCInstPrinter] Add parameter Address to printCustomAliasOperand. NFC
Follow-up of D72172 and llvmorg-11-init-6896-gb3cc5dcef0f.
2020-03-27 00:38:20 -07:00
Fangrui Song
56f7c7a2bd [MCInstPrinter] Add parameter Address to MCInstPrinter::printAliasInstr. NFC
Follow-up of D72172.
2020-03-27 00:03:32 -07:00
LLVM GN Syncbot
c9d270bf8d [gn build] Port 9f7d4150b9e 2020-03-26 21:10:45 +00:00
Simon Cook
baf8a6dc1d [RISCV] Support negative constants in CompressInstEmitter
Summary:
Some compressed instructions match against negative values; store
immediates as a signed value such that these patterns will now match
the intended instructions.

Reviewers: asb, lenary, PaoloS

Reviewed By: asb

Subscribers: rbar, johnrusso, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, evandro, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76767
2020-03-26 15:23:38 +00:00
Fangrui Song
7f7bfe12ea [MCInstPrinter] Pass Address parameter to MCOI::OPERAND_PCREL typed operands. NFC
Follow-up of D72172 and D72180

This patch passes `uint64_t Address` to print methods of PC-relative
operands so that subsequent target specific patches can change
`*InstPrinter::print{Operand,PCRelImm,...}` to customize the output.

Add MCInstPrinter::PrintBranchImmAsAddress which is set to true by
llvm-objdump.

```
// Current llvm-objdump -d output
aarch64: 20000: bl #0
ppc:     20000: bl .+4
x86:     20000: callq 0

// Ideal output
aarch64: 20000: bl 0x20000
ppc:     20000: bl 0x20004
x86:     20000: callq 0x20005

// GNU objdump -d. The lack of 0x is not ideal because the result cannot be re-assembled
aarch64: 20000: bl 20000
ppc:     20000: bl 0x20004
x86:     20000: callq 20005
```

In `lib/Target/X86/X86GenAsmWriter1.inc` (generated by `llvm-tblgen -gen-asm-writer`):

```
   case 12:
     // CALL64pcrel32, CALLpcrel16, CALLpcrel32, EH_SjLj_Setup, JCXZ, JECXZ, J...
-    printPCRelImm(MI, 0, O);
+    printPCRelImm(MI, Address, 0, O);
     return;
```

Some targets have 2 `printOperand` overloads, one without `Address` and
one with `Address`. They should annotate derived `Operand` properly with
`let OperandType = "OPERAND_PCREL"`.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D76574
2020-03-26 08:21:15 -07:00
LLVM GN Syncbot
bee7db5b02 [gn build] Port 2aac0c47aed 2020-03-26 15:16:51 +00:00
Louis Dionne
8126913310 [lit] NFC: Remove trailing whitespace
I keep having to remove them from my diffs!
2020-03-26 11:05:18 -04:00
Nico Weber
eb93a680b8 revert parts of d7888149aa813f that several bots do not like 2020-03-25 14:05:07 -04:00
Nico Weber
47138b2f83 Suppress a few -Wunreachable-code warnings.
No behavior change. Also fix a comment to say match reality.
2020-03-25 13:55:42 -04:00
Nico Weber
9ce67593a9 [gn build] try removing a duplicate include dir 2020-03-25 13:23:47 -04:00
LLVM GN Syncbot
6d7506ae1e [gn build] Port ce984129eaa 2020-03-25 15:36:51 +00:00
LLVM GN Syncbot
f619eba211 [gn build] Port ba1f4405c68 2020-03-25 03:27:56 +00:00
Louis Dionne
e8ebe9cd4f [lit] Allow passing extra commands to executeShTest
This allows creating custom test formats on top of `executeShTest` that
inject commands at the beginning of the file being parsed, without
requiring these commands to physically appear in the test file itself.

For example, one could define a test format that prints out additional
debug information at the beginning of each test. More realistically,
this has been used to define custom test formats like one that supports
compilation failure tests (e.g. with the extension `compile.fail.cpp`)
by injecting a command that calls the compiler on the file itself and
expects it to fail.

Without this change, the only alternative is to create a temporary file
with the same content as the original test, then prepend the desired
`// RUN:` lines to that file, and call `executeShTest` on that file
instead. This is both slow and cumbersome to do.

Differential Revision: https://reviews.llvm.org/D76290
2020-03-24 15:02:37 -04:00
LLVM GN Syncbot
caa4525525 [gn build] Port b91905a2637 2020-03-24 16:46:53 +00:00
Nico Weber
b5e7c63121 [gn build] (manually) port 8140f6bcde4 better 2020-03-24 12:39:49 -04:00
Nico Weber
45c217b8bb [gn build] (manually) port 8140f6bcde4 2020-03-24 12:38:25 -04:00
Nico Weber
8375fac139 [gn build] Port 49e5a97ec36 2020-03-24 12:36:08 -04:00
Simon Pilgrim
bb10a9825b [UpdateTestChecks] Use common ir function name matcher and extend to accept periods in names (PR37586)
Remove the local versions of the IR_FUNCTION_RE matcher (they weren't doing anything different), and ensure all the function name matchers accept '.' and '-'.

We don't need to use '\.' inside python regex sets either, or '\-' as long as thats at the end of the set.
2020-03-24 10:59:30 +00:00
Peter Collingbourne
24071f551a scudo: Create a public include directory. NFCI.
For MTE error reporting we will need to expose interfaces for crash handlers
to use to interpret scudo headers and metadata. The intent is that these
interfaces will live in scudo/interface.h.

Move the existing interface.h into an include/scudo directory and make it
independent of the internal headers, so that we will be able to add the
interfaces there.

Differential Revision: https://reviews.llvm.org/D76648
2020-03-23 18:23:29 -07:00
LLVM GN Syncbot
1e282655bf [gn build] Port 7bf871c39f7 2020-03-23 21:05:55 +00:00
LLVM GN Syncbot
54a8d1843d [gn build] Port 56abcfad70e 2020-03-23 19:09:57 +00:00
LLVM GN Syncbot
fefa5b24ae [gn build] Port 57b8a407493 2020-03-23 17:23:22 +00:00
Fangrui Song
c08b947849 [gn build] Port 24698e526f619271705fe72bcaa928be9bc82484. Fix AMDGPUTests 2020-03-23 10:22:40 -07:00
Fangrui Song
b60b2bde27 [gn build] Port 24698e526f619271705fe72bcaa928be9bc82484 2020-03-23 10:04:36 -07:00
LLVM GN Syncbot
8e72b10003 [gn build] Port 34fd007aaf8 2020-03-21 20:48:15 +00:00
LLVM GN Syncbot
6ff402883a [gn build] Port 73cf8abbe69 2020-03-21 12:33:41 +00:00
LLVM GN Syncbot
6af85d4699 [gn build] Port 0f4c70dd3ec 2020-03-21 11:04:46 +00:00