Commit Graph

8775 Commits

Author SHA1 Message Date
Nico Weber c26a352f23 [gn build] (manually) ort 5074776de4 2020-03-30 22:06:36 -04:00
Julian Lettner d16ba9b0bd [lit] Use Python's support for None in array slice indexing 2020-03-30 12:44:03 -07:00
Nico Weber a235215415 fix a comment grammar-o 2020-03-30 14:40:15 -04:00
LLVM GN Syncbot 8242509a49 [gn build] Port 3cbbded68c 2020-03-30 18:16:33 +00:00
Nico Weber c506adcdf2 Move CLANG_SYSTEMZ_DEFAULT_ARCH to config.h.
Instead of using a global define; see comments on D75914.

While here, port 9c9d88d8b1 to the GN build.
2020-03-30 14:16:17 -04:00
LLVM GN Syncbot 6628c525cb [gn build] Port 854f268ca6 2020-03-29 19:24:34 +00:00
Benjamin Kramer 854f268ca6 [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 8896d12315 [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] cf252240e8

Reviewed By: paquette

Differential Revision: https://reviews.llvm.org/D76940
2020-03-27 12:07:19 -07:00
LLVM GN Syncbot f8c25945e5 [gn build] Port d60d7d69de 2020-03-27 16:07:06 +00:00
Louis Dionne 08d5426981 [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 faf415a1de [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 6728a9ae19 [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 b3cc5dcef0 [MCInstPrinter] Add parameter `Address` to MCInstPrinter::printAliasInstr. NFC
Follow-up of D72172.
2020-03-27 00:03:32 -07:00
LLVM GN Syncbot 196286434d [gn build] Port 9f7d4150b9 2020-03-26 21:10:45 +00:00
Simon Cook 1e30396223 [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 5fad05e80d [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 b9943d68d3 [gn build] Port 2aac0c47ae 2020-03-26 15:16:51 +00:00
Louis Dionne 0bd1276eed [lit] NFC: Remove trailing whitespace
I keep having to remove them from my diffs!
2020-03-26 11:05:18 -04:00
Nico Weber 13d267e302 revert parts of d7888149aa that several bots do not like 2020-03-25 14:05:07 -04:00
Nico Weber d7888149aa 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 717d7e3f44 [gn build] try removing a duplicate include dir 2020-03-25 13:23:47 -04:00
LLVM GN Syncbot 69def20542 [gn build] Port ce984129ea 2020-03-25 15:36:51 +00:00
LLVM GN Syncbot c2273883e2 [gn build] Port ba1f4405c6 2020-03-25 03:27:56 +00:00
Louis Dionne 8f64b02d33 [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 26d4b5514a [gn build] Port b91905a263 2020-03-24 16:46:53 +00:00
Nico Weber 9ca6334c33 [gn build] (manually) port 8140f6bcde better 2020-03-24 12:39:49 -04:00
Nico Weber e322108667 [gn build] (manually) port 8140f6bcde 2020-03-24 12:38:25 -04:00
Nico Weber 5d29aebf87 [gn build] Port 49e5a97ec3 2020-03-24 12:36:08 -04:00
Simon Pilgrim 8905617ee3 [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 8140f6bcde 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 defd96f1e3 [gn build] Port 7bf871c39f 2020-03-23 21:05:55 +00:00
LLVM GN Syncbot 75add0b2ef [gn build] Port 56abcfad70 2020-03-23 19:09:57 +00:00
LLVM GN Syncbot 9607a119bd [gn build] Port 57b8a40749 2020-03-23 17:23:22 +00:00
Fangrui Song ff042de67d [gn build] Port 24698e526f. Fix AMDGPUTests 2020-03-23 10:22:40 -07:00
Fangrui Song 552bd477f8 [gn build] Port 24698e526f 2020-03-23 10:04:36 -07:00
LLVM GN Syncbot d779ee152c [gn build] Port 34fd007aaf 2020-03-21 20:48:15 +00:00
LLVM GN Syncbot 9ab0c9a644 [gn build] Port 73cf8abbe6 2020-03-21 12:33:41 +00:00
LLVM GN Syncbot b6d9bfd180 [gn build] Port 0f4c70dd3e 2020-03-21 11:04:46 +00:00
Adrian Kuegel baa6f6a782 Revert "[TableGen][GlobalISel] Account for HwMode in RegisterBank register sizes"
This reverts commit e9f22fd429.

When building with -DLLVM_USE_SANITIZER="Thread", check-llvm has 70
failing tests with this revision, and 29 without this revision.
2020-03-20 11:02:50 +01:00
LLVM GN Syncbot 1d5560c363 [gn build] Port 733b319948 2020-03-19 09:52:27 +00:00
Simon Moll 733b319948 [VP,Integer,#1] Vector-predicated integer intrinsics
Summary:
This patch adds IR intrinsics for vector-predicated integer arithmetic.

It is subpatch #1 of the [integer
slice](https://reviews.llvm.org/D57504#1732277) of
[LLVM-VP](https://reviews.llvm.org/D57504).  LLVM-VP is a larger effort to bring
native vector predication to LLVM.

Reviewed By: andrew.w.kaylor

Differential Revision: https://reviews.llvm.org/D69891
2020-03-19 10:51:47 +01:00
Louis Dionne f951b0f82d [lit] Add builtin support for flaky tests in lit
This commit adds a new keyword in lit called ALLOW_RETRIES. This keyword
takes a single integer as an argument, and it allows the test to fail that
number of times before it first succeeds.

This work attempts to make the existing test_retry_attempts more flexible
by allowing by-test customization, as well as eliminate libc++'s FLAKY_TEST
custom logic.

Differential Revision: https://reviews.llvm.org/D76288
2020-03-18 18:04:01 -04:00
lewis-revill e9f22fd429 [TableGen][GlobalISel] Account for HwMode in RegisterBank register sizes
This patch generates TableGen descriptions for the specified register
banks which contain a list of register sizes corresponding to the
available HwModes. The appropriate size is used during codegen according
to the current HwMode. As this HwMode was not available on generation,
it is set upon construction of the RegisterBankInfo class. Targets
simply need to provide the HwMode argument to the
<target>GenRegisterBankInfo constructor.

The RISC-V RegisterBankInfo constructor has been updated accordingly
(plus an unused argument removed).

Differential Revision: https://reviews.llvm.org/D76007
2020-03-18 19:52:23 +00:00
lewis-revill e225e770f7 [TableGen][GlobalISel] Rework RegisterBankEmitter for easier const correctness.
This patch rewrites the RegisterBankEmitter class to derive
RegisterClassHierarchy from CodeGenTarget::getRegBank() rather than
constructing our own copy. All are now accessed through a const
reference.

Differential Revision: https://reviews.llvm.org/D76006
2020-03-18 19:52:23 +00:00
Nico Weber 642a424bc4 [gn build] remove a workaround that is no longer needed 2020-03-18 12:37:15 -04:00
Nico Weber f57290ec57 [gn build] add rebase changes that should have been in 9f981e9adf 2020-03-18 11:38:37 -04:00
Nico Weber 9f981e9adf Reland "[gn build] (manually) port 8b409eaba"
This reverts commit 4060016fce
and re-merges c5b81466c.
2020-03-18 11:31:18 -04:00
Louis Dionne 1458bb92df [lit] NFC: Fix typo in log statement 2020-03-17 16:49:56 -04:00
LLVM GN Syncbot 5555c04ba9 [gn build] Port 080dd10f7d 2020-03-17 19:45:39 +00:00
LLVM GN Syncbot ad357c1523 [gn build] Port ac1d23ed7d 2020-03-17 13:01:49 +00:00
LLVM GN Syncbot 1b5970edda [gn build] Port 876bb86e26 2020-03-17 08:24:39 +00:00
LLVM GN Syncbot 78ce190803 [gn build] Port df082ac45a 2020-03-16 23:09:12 +00:00
Nico Weber 9e48422035 Revert "[llvm-objdump] Display locations of variables alongside disassembly"
Makes tests fail on Windows, see https://reviews.llvm.org/D70720#1924542

This reverts commit 3a5ddedadb, and
follow-ups:
f4cb9c919e
042eb0482a
c0cf5f5da9
18649f4813
f62b898c1f
2020-03-16 14:04:25 -04:00
Nico Weber 4060016fce Revert "[gn build] (manually) port 8b409eaba"
This reverts commit 85462aefb5
and follow-up 8d6582aa6b.

8b409eaba was reverted.
2020-03-16 11:33:19 -04:00
LLVM GN Syncbot 185b41393d [gn build] Port f62b898c1f 2020-03-16 13:54:40 +00:00
Nico Weber 8d6582aa6b [gn build] (manually) port 8b409eaba more 2020-03-16 09:54:22 -04:00
Nico Weber 85462aefb5 [gn build] (manually) port 8b409eaba 2020-03-16 09:47:06 -04:00
Nico Weber 7f5b8115ac [gn build] don't repeat arm header targets twice. no behavior change. 2020-03-15 18:20:26 -04:00
LLVM GN Syncbot de0011abf5 [gn build] Port 5087ace651 2020-03-15 20:28:52 +00:00
Nico Weber 47df2220a2 [gn build] (manually) port 5087ace651 more 2020-03-15 16:28:19 -04:00
Nico Weber d09a46cdbc [gn build] (manually) port 5087ace651 2020-03-15 16:06:37 -04:00
LLVM GN Syncbot ee04339b7f [gn build] Port 633ea07200 2020-03-14 21:50:50 +00:00
Simon Cook a26bd4ec16 [TableGen] Support combining AssemblerPredicates with ORs
For context, the proposed RISC-V bit manipulation extension has a subset
of instructions which require one of two SubtargetFeatures to be
enabled, 'zbb' or 'zbp', and there is no defined feature which both of
these can imply to use as a constraint either (see comments in D65649).

AssemblerPredicates allow multiple SubtargetFeatures to be declared in
the "AssemblerCondString" field, separated by commas, and this means
that the two features must both be enabled. There is no equivalent to
say that _either_ feature X or feature Y must be enabled, short of
creating a dummy SubtargetFeature for this purpose and having features X
and Y imply the new feature.

To solve the case where X or Y is needed without adding a new feature,
and to better match a typical TableGen style, this replaces the existing
"AssemblerCondString" with a dag "AssemblerCondDag" which represents the
same information. Two operators are defined for use with
AssemblerCondDag, "all_of", which matches the current behaviour, and
"any_of", which adds the new proposed ORing features functionality.

This was originally proposed in the RFC at
http://lists.llvm.org/pipermail/llvm-dev/2020-February/139138.html

Changes to all current backends are mechanical to support the replaced
functionality, and are NFCI.

At this stage, it is illegal to combine features with ands and ors in a
single AssemblerCondDag. I suspect this case is sufficiently rare that
adding more complex changes to support it are unnecessary.

Differential Revision: https://reviews.llvm.org/D74338
2020-03-13 17:13:51 +00:00
Matt Arsenault 6bbc1737e0 TableGen: Fix typo 2020-03-13 10:45:28 -04:00
LLVM GN Syncbot 73d8a324ec [gn build] Port 512767eb3f 2020-03-13 14:09:37 +00:00
Nico Weber 5c68043b9f [gn build] (manually) port ce79c4246 2020-03-13 06:08:28 -04:00
Nico Weber 03f5f6bebd [gn build] (manually) port eb41cc6198 2020-03-12 19:29:09 -04:00
LLVM GN Syncbot b93dd67797 [gn build] Port fa8080376e 2020-03-12 16:33:39 +00:00
LLVM GN Syncbot e79397f5e2 [gn build] Port 2c9cf9f4dd 2020-03-12 16:01:56 +00:00
LLVM GN Syncbot f31f22ef0f [gn build] Port d5edcb9064 2020-03-12 11:58:14 +00:00
LLVM GN Syncbot 9dd561d8b1 [gn build] Port 518292dbdf 2020-03-12 05:17:52 +00:00
Christian Sigg f3ad6eb5d3 Change to individual pretty printer classes, remove generic `make_printer`.
Summary: Follow-up from D72589.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: merge_guards_bot, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73609
2020-03-11 15:04:03 +01:00
LLVM GN Syncbot 8d9886f893 [gn build] Port 326bc1da45 2020-03-11 10:47:56 +00:00
LLVM GN Syncbot 7ecc743c5d [gn build] Port ebdb98f254 2020-03-10 20:34:28 +00:00
LLVM GN Syncbot a1224432ca [gn build] Port a4cde9ad7b 2020-03-10 17:04:42 +00:00
LLVM GN Syncbot 14219aa442 [gn build] Port 714466bf36 2020-03-10 14:33:04 +00:00
Nico Weber 877073bc1c [gn build] (manually) merge 47edf5bafb 2020-03-10 10:22:39 -04:00
Reid Kleckner d75be4c06a [gn] Use ghash if using clang & LLD together to make PDBs
I noticed my links were a bit slower on Windows than usual.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D75774
2020-03-09 15:23:54 -07:00
LLVM GN Syncbot 78ad24bff6 [gn build] Port 1e0669bfe0 2020-03-09 21:59:49 +00:00
Arthur Eubanks 3262319806 Fix typo in gn files
SKD -> SDK
2020-03-09 13:33:13 -07:00
LLVM GN Syncbot 4a1b6b0057 [gn build] Port 3486cc014b 2020-03-09 17:56:57 +00:00
LLVM GN Syncbot 3b64bf7b01 [gn build] Port 882f589e20 2020-03-09 16:03:39 +00:00
LLVM GN Syncbot 9800543aed [gn build] Port 57c964aaa7 2020-03-08 11:50:36 +00:00
Nico Weber 8fef67a2c5 [gn build] copy compiler-rt headers to clang include dir on all platforms 2020-03-06 21:55:56 -05:00
Yuanfang Chen 1f7badf979 Add some more vscode files
On top of existing TableGen file syntax highlighting, added
- IR syntax highlighting
- LIT test output patterMatcher
- etc.
2020-03-05 19:31:28 -08:00
Fangrui Song 3e851f4a68 [PowerPC] Delete PPCMachObjectWriter and powerpc{,64}-apple-darwin
Reviewed By: #powerpc, sfertile

Differential Revision: https://reviews.llvm.org/D75494
2020-03-05 11:05:26 -08:00
LLVM GN Syncbot 6f1222560b [gn build] Port cada5b881b 2020-03-05 10:56:10 +00:00
Fangrui Song 1a5da3f0b2 [gn build] Fix llvm-gsymutil after D75291 2020-03-03 16:37:52 -08:00
Greg Clayton 90e40a0bda Rename "llvm-gsym" to "llvm-gsymutil" and fix dependencies.
Summary: This patch renames the "llvm-gsym" tool directory to "llvm-gsymutil". Dependencies are also reduced to the bare minimum for llvm-gsymutil.

Reviewers: aprantl, thakis

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75291
2020-03-03 14:13:29 -08:00
LLVM GN Syncbot 22dd23583a [gn build] Port c84532a70a 2020-03-03 18:25:30 +00:00
LLVM GN Syncbot 680a75e1e4 [gn build] Port ae4d39c9e4 2020-03-03 15:41:46 +00:00
LLVM GN Syncbot f2cd085078 [gn build] Port 613f791131 2020-03-03 14:16:22 +00:00
LLVM GN Syncbot ac8680f0d8 [gn build] Port 3a063d68e3 2020-03-03 13:33:01 +00:00
LLVM GN Syncbot c016e9fbee [gn build] Port 3755039c99 2020-03-03 13:33:01 +00:00
LLVM GN Syncbot a38b49918b [gn build] Port 1454c27b60 2020-03-03 11:18:38 +00:00
Hans Wennborg 93c73d4834 Revert "Reland "[gn build] (manually) merge 68a235d07f9e70""
This reverts commit 94d4ca9004.

I reverted 68a235d07f again in
916be8fd6a.
2020-03-03 11:21:11 +01:00
Joerg Sonnenberger eb812efa12 Explicitly include <cassert> when using assert
Depending on the OS used, a module-enabled build can fail due to the
special handling <cassert> gets as textual header.
2020-03-02 22:45:28 +01:00
LLVM GN Syncbot b9f37e9ace [gn build] Port 49684f9db5 2020-03-02 17:35:47 +00:00
LLVM GN Syncbot 8c7c32b4c9 [gn build] Port 5a1958f267 2020-03-02 09:02:51 +00:00
Reid Kleckner af450eabb9 Avoid including FileSystem.h from MemoryBuffer.h
Lots of headers pass around MemoryBuffer objects, but very few open
them. Let those that do include FileSystem.h.

Saves ~250 includes of Chrono.h & FileSystem.h:

$ diff -u thedeps-before.txt thedeps-after.txt | grep '^[-+] ' | sort | uniq -c | sort -nr
    254 -    ../llvm/include/llvm/Support/FileSystem.h
    253 -    ../llvm/include/llvm/Support/Chrono.h
    237 -    ../llvm/include/llvm/Support/NativeFormatting.h
    237 -    ../llvm/include/llvm/Support/FormatProviders.h
    192 -    ../llvm/include/llvm/ADT/StringSwitch.h
    190 -    ../llvm/include/llvm/Support/FormatVariadicDetails.h
...

This requires duplicating the file_t typedef, which is unfortunate. I
sunk the choice of mapping mode down into the cpp file using variable
template specializations instead of class members in headers.
2020-02-29 12:30:23 -08:00
Jordan Rupprecht d369334270 [NFC] Fix minor python issues.
* llvm-gisel-cov.py: extra `)` after print
* chunk-print-before-all.py: py2-only print method
2020-02-28 14:17:43 -08:00
Jay Foad 395e2c0679 [Utils] Make some scripts directly executable 2020-02-28 13:39:54 +00:00
LLVM GN Syncbot 29fb0b1310 [gn build] Port 6af859dcca 2020-02-28 11:49:23 +00:00
LLVM GN Syncbot 2301a18c1c [gn build] Port b0142cd986 2020-02-27 20:40:16 +00:00
LLVM GN Syncbot 299c3e13fb [gn build] Port 3c36d8dad5 2020-02-26 16:09:48 +00:00
Nico Weber cfbe889af5 [gn build] re-"gn format" all gn files 2020-02-26 08:38:34 -05:00
Nico Weber ce75c3d2b6 [gn build] (manually) port 2f6cc21f44 2020-02-26 08:36:05 -05:00
Nico Weber 1b30b49436 [gn build] (manually) merge e058667a2e 2020-02-26 07:33:32 -05:00
Adrian Prantl 828fb0c51a Fix a null dereference in the LLDB data formatters. 2020-02-25 16:43:55 -08:00
Hans Wennborg edae4be8e2 Fix DfaEmitter::visitDfaState() crash in MSVC x86 debug builds (PR44945)
No functionality change (intended), but this seems to make the code a
bit clearer for the compiler and maybe for human readers too.
2020-02-25 15:18:41 +01:00
Nico Weber 3950093951 [gn build] (manually) merge fee41517fe 2020-02-25 07:19:49 -05:00
Hans Wennborg 4486aa03c5 build_llvm_package.bat: Produce zip files in addition to the installers
Now that the Windows installer no longer does anything besides
self-extract, maybe it would make sense to distribute the toolchain as a
plain zip file in addition to the current installer.

Differential revision: https://reviews.llvm.org/D74896
2020-02-25 12:14:07 +01:00
Peter Collingbourne 0414c56940 Revert "Rework go bindings so that validation works fine"
And add llvm-go back to the test dependencies.

No longer necessary now that llvm-go has been brought back.

This reverts commit e8f8873da5.
2020-02-24 09:20:08 -08:00
Nico Weber 453d54865a [gn build] remove -std=c++11 in libcxx build pending discussion in 80e73f2 review thread 2020-02-24 12:10:40 -05:00
Nico Weber 406a54b65f [gn build] (manually) merge 54fa9ecd30 2020-02-24 11:42:32 -05:00
Bevin Hansson c3f36acc92 [MC] Widen the functional unit type from 32 to 64 bits.
Summary:
The type used to represent functional units in MC is
'unsigned', which is 32 bits wide. This is currently
not a problem in any upstream target as no one seems
to have hit the limit on this yet, but in our
downstream one, we need to define more than 32
functional units.

Increasing the size does not seem to cause a huge
size increase in the binary (an llc debug build went
from 1366497672 to 1366523984, a difference of 26k),
so perhaps it would be acceptable to have this patch
applied upstream as well.

Subscribers: hiraditya, jsji, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71210
2020-02-24 09:37:00 +01:00
LLVM GN Syncbot 8fa776b8ed [gn build] Port 1874dee566 2020-02-21 20:51:44 +00:00
Craig Topper 8875ee18d7 [X86] Add a new format type for instructions that represent named prefix bytes like data16 and rep. Use it to make a simpler version of isPrefix.
isPrefix was added to support the patches to align branches.
it relies on a switch over instruction names.

This moves those opcodes to a new format so the information is
tablegen and we can just check for a specific value in some bits
in TSFlags instead.

I've left the other function in place for now so that the
existing patches in phabricator will still work. I'll work with
the owner to get them migrated.
2020-02-21 12:34:59 -08:00
Fangrui Song e4df934ca7 [Clang interpreter] Rename Block.{h,cpp} to InterpBlock.{h,cpp}
The Blocks runtime provide a header named Block.h.
It is generally preferable to avoid name collision with system headers
(reducing reliance on -isystem order, more friendly when navigating files in
an editor, etc).

Reviewed By: gribozavr2

Differential Revision: https://reviews.llvm.org/D74934
2020-02-21 09:47:28 -08:00
LLVM GN Syncbot 8c70a2597f [gn build] Port 23444edf30 2020-02-21 17:21:54 +00:00
Sanjay Patel 15e20dcb8f [Utils][x86] add an option to reduce scrubbing of shuffles with memops
I was drafting a patch that would increase broadcast load usage,
but our shuffle scrubbing makes it impossible to see if the memory
operand offset was getting created correctly. I'm proposing to make
that an option (defaulted to 'off' for now to reduce regression
test churn).

The updated files provide examples of tests where we can now verify
that the pointer offset for a loaded memory operand is correct. We
still have stack and constant scrubbing that can obscure the operand
even if we don't scrub the entire instruction.

Differential Revision: https://reviews.llvm.org/D74775
2020-02-20 09:33:05 -05:00
Matt Arsenault de6e968c0d TableGen: Fix logic for default operands
This was checking for default operands in the current DAG instruction,
rather than the correct result operand list. I'm not entirly sure how
this managed to work before, but was failing for me when multiple
default operands were overridden.
2020-02-19 23:41:07 -05:00
Nico Weber 8ea3eb86d6 [gn build] (manually) partially (?) merge 7ff1f55a12 2020-02-19 21:09:44 -05:00
LLVM GN Syncbot 38419b8afa [gn build] Port 85fb997659 2020-02-19 22:58:29 +00:00
Simon Pilgrim 59982a6d8f [UpdateTestChecks] Add support for '.' in ir function names
Will let us regenerate from amdgpu float constant tests
2020-02-19 18:58:44 +00:00
Nico Weber 187204cd74 [gn build] use \bfoo\b instead of \<foo\> in sync script
\<foo\> is more correct, but since we use shell=True on Windows,
the < and > get interpreted as redirection operators.

Rather than adding cmd escaping, just use \bfoo\b, which is Good
Enough Often Enough.
2020-02-19 12:32:02 -05:00
LLVM GN Syncbot 069b85fed1 [gn build] Port a54d81f597 2020-02-19 17:28:29 +00:00
Nico Weber f14f9bd22e [gn build] Set up include_dirs for a54d81f597 (first checker in a subdir) 2020-02-19 12:24:01 -05:00
Nico Weber bde0e320bc [gn build] revert e8e078c8bf
Now that I've updated ancient goma clients on the bots, this should
work. (Internal goma bug: b/139410332, fixed months ago.)
2020-02-19 11:11:25 -05:00
Krzysztof Parzyszek bc23e83e45 Add <128 x i1> as an intrinsic type 2020-02-19 09:38:13 -06:00
Jay Foad a912275864 [TableGen] Diagnose undefined fields when generating searchable tables
Summary:
Previously TableGen would crash trying to print the undefined value as
an integer.

Change-Id: I3900071ceaa07c26acafb33bc49966d7d7a02828

Reviewers: nhaehnle

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74210
2020-02-19 14:03:48 +00:00
LLVM GN Syncbot 7a4ddfb774 [gn build] Port ca9ba76481 2020-02-19 00:02:12 +00:00
Reid Kleckner 0c2b09a9b6 [IR] Lazily number instructions for local dominance queries
Essentially, fold OrderedBasicBlock into BasicBlock, and make it
auto-invalidate the instruction ordering when new instructions are
added. Notably, we don't need to invalidate it when removing
instructions, which is helpful when a pass mostly delete dead
instructions rather than transforming them.

The downside is that Instruction grows from 56 bytes to 64 bytes.  The
resulting LLVM code is substantially simpler and automatically handles
invalidation, which makes me think that this is the right speed and size
tradeoff.

The important change is in SymbolTableTraitsImpl.h, where the numbering
is invalidated. Everything else should be straightforward.

We probably want to implement a fancier re-numbering scheme so that
local updates don't invalidate the ordering, but I plan for that to be
future work, maybe for someone else.

Reviewed By: lattner, vsk, fhahn, dexonsmith

Differential Revision: https://reviews.llvm.org/D51664
2020-02-18 14:44:24 -08:00
LLVM GN Syncbot e706656af0 [gn build] Port c9e93c84f6 2020-02-18 18:45:25 +00:00
Nico Weber 711caee533 [gn build] (manually) port fc69967a4b 2020-02-18 13:29:13 -05:00
Stanislav Mekhanoshin b2a958a013 [TBLGEN] Emit register pressure set enum
Differential Revision: https://reviews.llvm.org/D74649
2020-02-18 10:09:05 -08:00
Benjamin Kramer 44bbc76700 Drop a constexpr in favor of const, MSVC complains.
lib\Target\Hexagon\HexagonGenDFAPacketizer.inc(109): error C2131: expression did not evaluate to a constant
2020-02-18 17:04:42 +01:00
Benjamin Kramer 9e4b761aba Move DFA tables into the read-only data segmant. 2020-02-18 14:36:56 +01:00
Stanislav Mekhanoshin 8e760e1018 [TBLGEN] Inhibit generation of unneeded psets
Differential Revision: https://reviews.llvm.org/D74744
2020-02-17 15:38:08 -08:00
Nico Weber f4158dceb5 [gn build] (manually) merge e9849d519 2020-02-17 14:37:43 -05:00
Simon Tatham 377b0e2b06 [TableGen] Don't elide bitconverts in PatFrag fragments.
Summary:
In the DAG pattern backend, `SimplifyTree` simplifies a pattern by
removing bitconverts between two identical types. But that function is
also run on the fragments list in instances of `PatFrags`, in which
the types haven't been specified yet. So the input and output of the
bitconvert always evaluate to the empty set of types, which makes them
compare equal. So the test always passes, and bitconverts are
unconditionally removed from the PatFrag RHS.

Fixed by spotting the empty type set and using it to inhibit the
optimization.

Reviewers: nhaehnle, hfinkel

Reviewed By: nhaehnle

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74627
2020-02-17 09:30:45 +00:00
Nico Weber e8e078c8bf [gn build] use -Xclang form for fdebug-comp-dir for now
The driver version of the flag seems to confuse goma.
2020-02-16 21:30:27 -05:00
LLVM GN Syncbot c7c42b4a93 [gn build] Port ee2c0f76d7 2020-02-16 17:32:06 +00:00
Eric Astor ee2c0f76d7 [ms] [llvm-ml] Add a draft MASM parser
Summary:
Many directives are unavailable, and support for others may be limited.

This first draft has preliminary support for:
    - conditional directives (including errors),
    - data allocation (unsigned types up to 8 bytes, and ALIGN),
    - equates/variables (numeric and text),
    - and procedure directives (without parameters),
as well as COMMENT, ECHO, INCLUDE, INCLUDELIB, PUBLIC, and EXTERN. Text variables (aka text macros) are expanded in-place wherever the identifier occurs.

We deliberately ignore all ml.exe processor directives.

Prominent features not yet supported:
    - structs
    - macros (both procedures and functions)
    - procedures (with specified parameters)
    - substitution & expansion operators

Conditional directives are complicated by the fact that "ifdef rax" is a valid way to check if a file is being assembled for a 64-bit x86 processor; we add support for "ifdef <register>" in general, which requires adding a tryParseRegister method to all MCTargetAsmParsers. (Some targets require backtracking in the non-register case.)

Reviewers: rnk, thakis

Reviewed By: thakis

Subscribers: kerbowa, merge_guards_bot, wuzish, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, mgorny, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72680
2020-02-16 12:30:46 -05:00
Nico Weber 37d1120572 [gn build] unbreak win build by removing flags that only work with a sysroot 2020-02-15 06:25:21 -05:00
Nico Weber ead0b76382 [gn build] Make build locally deterministic
This follows http://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html
to make the GN build locally deterministic.

With this, I've built lld at two different build paths on my Windows box and got
identical binaries. (I'd expect the same to happen on Linux, and with other
binaries.)

This doesn't have the bits to get universal determinism yet.

Differential Revision: https://reviews.llvm.org/D74519
2020-02-14 21:55:33 -05:00
Stanislav Mekhanoshin 922197d664 [TBLGEN] Allow to override RC weight
Differential Revision: https://reviews.llvm.org/D74509
2020-02-14 15:49:52 -08:00
Nico Weber 09153ab9d2 [windows] Add /Gw to compiler flags
This is like -fdata-sections, and it's not part of /O2 by default for some reason.

In the cmake build, reduces the size of clang.exe from 70,358,016 bytes to 69,982,720 bytes.

clang-format.exe goes from 3,703,296 bytes to 3,331,072 bytes.

Differential Revision: https://reviews.llvm.org/D74573
2020-02-14 15:15:00 -05:00
Alex Richardson c29310707e Fix line endings produced by update_cc_test_checks.py
Use the same appraoch as update_llc_test_checks.py to always write \n
line endings. This should fix the Windows buildbots.
2020-02-14 15:17:27 +00:00
serge-sans-paille f8b8a1ca8b Fix lit version test
Looks like on some system, version is printed on stderr, on some it's on stdout...
2020-02-13 21:49:48 +01:00
LLVM GN Syncbot f888ae7262 [gn build] Port 49bffa5f8b 2020-02-13 20:43:19 +00:00
serge-sans-paille 1d4849379f Fix handling of --version in lit
There's no reason why we should require a directory when asking for the version.

Differential Revision: https://reviews.llvm.org/D74553
2020-02-13 21:36:12 +01:00
LLVM GN Syncbot 1bafd2be06 [gn build] Port 19602b7194 2020-02-13 18:52:48 +00:00
Nico Weber 0bd6be9c3d [gn build] Fix sync script on renames like "Foo.cpp" -> "LLVMFoo.cpp"
Before, the script used `git log -SFoo.cpp` to find a commit where
the number of occurrences of "Foo.cpp" changed -- but since
a patch with

  + LLVMFoo.cpp
  - Foo.cpp

contains the same number of instances of "Foo.cpp", the script
incorrectly skipped this type of rename.

As fix, look for '\bFoo\.cpp\b' instead and pass --pickaxe-regex
so that we can grep for word boundaries.

To test, check out 7531a5039f (which renamed in llvm/lib/IR
RemarkStreamer.cpp to LLVMRemarkStreamer.cpp) and look at the output of
the script.  Before this change, it correctly assigned the addition
of LLVMRemarkStreamer.cpp to 7531a5039f but incorrectly assigned
the removal of RemarkStreamer.cpp to b8a847c.  With this, it
correctly assigns both to 7531a5039f.
2020-02-13 09:26:47 -05:00
serge-sans-paille e8f8873da5 Rework go bindings so that validation works fine
Basically change the layout to please `go build` and remove references to
`llvm-go`.

Update llvm/test/Bindings/Go/ to use the system go compiler

Differential Revision: https://reviews.llvm.org/D74540
2020-02-13 14:13:03 +01:00
Stanislav Mekhanoshin f8d044bbcf [TBLGEN] Fix subreg value overflow in DAGISelMatcher
Tablegen's DAGISelMatcher emits integers in a VBR format,
so if an integer is below 128 it can fit into a single
byte, otherwise high bit is set, next byte is used etc.
MatcherTable is essentially an unsigned char table. When
SelectionDAGISel parses the table it does a reverse translation.

In a situation when numeric value of an integer to emit is
unknown it can be emitted not as OPC_EmitInteger but as
OPC_EmitStringInteger using a symbolic name of the value.
In this situation the value should not exceed 127.

One of the situations when OPC_EmitStringInteger is used is
if we need to emit a subreg into a matcher table. However,
number of subregs can exceed 127. Currently last defined subreg
for AMDGPU is 192. That results in a silent bug in the ISel
with matcher reading from an invalid offset.

Fixed this bug to emit actual VBR encoded value for a subregs
which value exceeds 127.

Differential Revision: https://reviews.llvm.org/D74368
2020-02-12 13:29:57 -08:00
LLVM GN Syncbot 5ed15ff6b4 [gn build] Port 6030fe01f4 2020-02-12 18:34:39 +00:00
Derek Schuff b2c44de956 [llvm-objcopy][WebAssembly] Add dump/add/remove-section support
Add support for adding, removing, and dumping wasm sections to objcopy

Differential Revision: https://reviews.llvm.org/D70970
2020-02-11 15:17:18 -08:00
Justin Lebar 1bd6123b78 Use std::foo_t rather than std::foo in LLVM.
Summary: C++14 migration. No functional change.

Reviewers: bkramer, JDevlieghere, lebedev.ri

Subscribers: MatzeB, hiraditya, jkorous, dexonsmith, arphaman, kadircet, lebedev.ri, usaxena95, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D74384
2020-02-11 15:12:51 -08:00
Johannes Doerfert 1217ea502e [NFC] Fix spelling 2020-02-11 16:44:04 -06:00
Johannes Doerfert 1698cc7eba [Utils] Allow "on-the-fly" argument changes for update_test_check scripts
Update test scripts were limited because they performed a single action
on the entire file and if that action was controlled by arguments, like
the one introduced in D68819, there was no record of it.

This patch introduces the capability of changing the arguments passed to
the script "on-the-fly" while processing a test file. In addition, an
"on/off" switch was added so that processing can be disabled for parts
of the file where the content is simply copied. The last extension is a
record of the invocation arguments in the auto generated NOTE. These
arguments are also picked up in a subsequent invocation, allowing
updates with special options enabled without user interaction.

To change the arguments the string `UTC_ARGS:` has to be present in a
line, followed by "additional command line arguments". That is
everything that follows `UTC_ARGS:` will be added to a growing list
of "command line arguments" which is reparsed after every update.

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D69701
2020-02-11 16:29:46 -06:00
Reid Kleckner 2040831d05 [gn] Paper over Py3 urllib2 incompatibility in gn/get.py
Tested with both Python 2.7 and Python 3.7.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D73234
2020-02-11 11:39:16 -08:00
LLVM GN Syncbot 9220bbc909 [gn build] Port 453a8f3af7 2020-02-11 19:14:15 +00:00
Peter Collingbourne 76d6bce629 gn build: Make scudo cflags more consistent with the cmake build. 2020-02-11 10:05:48 -08:00
Justin Lebar fb45968e62 Use C++14-style return type deduction in LLVM.
Summary:
Simplifies the C++11-style "-> decltype(...)" return-type deduction.

Note that you have to be careful about whether the function return type
is `auto` or `decltype(auto)`.  The difference is that bare `auto`
strips const and reference, just like lambda return type deduction.  In
some cases that's what we want (or more likely, we know that the return
type is a value type), but whenever we're wrapping a templated function
which might return a reference, we need to be sure that the return type
is decltype(auto).

No functional change.

Subscribers: dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74383
2020-02-11 07:38:42 -08:00
LLVM GN Syncbot f1ceda4bd5 [gn build] Port bb383ae612 2020-02-10 21:43:41 +00:00
Eric Christopher 102814b4d3 Continue removing llgo. 2020-02-10 10:33:58 -08:00
LLVM GN Syncbot 4b1df7356a [gn build] Port 0151ddc2e8 2020-02-10 15:56:57 +00:00
Bill Wendling c55cf4afa9 Revert "Remove redundant "std::move"s in return statements"
The build failed with

  error: call to deleted constructor of 'llvm::Error'

errors.

This reverts commit 1c2241a793.
2020-02-10 07:07:40 -08:00
Bill Wendling 1c2241a793 Remove redundant "std::move"s in return statements 2020-02-10 06:39:44 -08:00
Nico Weber 3dc47979bb [gn build] make 'clang' target depend on libcxx/include on mac
On macOS, libc++ headers are distributed with the compiler, not
the sysroot. Without this, compiling a file that includes something
like <string> won't compile with gn-built clang without manual tweaks.

I used to do the manual tweaks, but now that other people are starting
to use this on mac, let's make it Just Work.

(This is marginally nicer than the cmake build now in that you can
just build 'clang' and it'll do the right thing.)

Differential Revision: https://reviews.llvm.org/D74247
2020-02-10 07:43:42 -05:00
LLVM GN Syncbot 628462e30a [gn build] Port a17f03bd93 2020-02-09 15:41:05 +00:00
Nico Weber 8df173f399 [gn build] (manually) port 72277ecd62 and the LLVMBuild bit of 9548b74a83 2020-02-08 19:01:55 -05:00
Fangrui Song 280f15cb41 [gn build] Add OpenMPOpt.cpp to LLVMipo after D69930/9548b74a831e 2020-02-08 14:18:43 -08:00
LLVM GN Syncbot 1ea2723eb5 [gn build] Port 446268a223 2020-02-07 13:35:48 +00:00
LLVM GN Syncbot 4fb10be4b8 [gn build] Port b12176d2aa 2020-02-05 19:16:15 +00:00
LLVM GN Syncbot d2182d6c2c [gn build] Port fc62b36a00 2020-02-05 18:06:25 +00:00
LLVM GN Syncbot 622ef91b18 [gn build] Port b198f16e1e 2020-02-05 17:03:12 +00:00
LLVM GN Syncbot f722284cdf [gn build] Port b8a847c0a3 2020-02-05 01:27:20 +00:00
LLVM GN Syncbot 2406a06e67 [gn build] Port 7531a5039f 2020-02-05 01:27:19 +00:00
David Bozier 6e01cd6795 Improve error message of FileCheck when stdin is empty
Summary: Replace '-' in the error message with <stdin>. This is also consistent with another error message in the code.

Reviewers: jhenderson, probinson, jdenny, grimar, arichardson

Reviewed By: jhenderson

Subscribers: thopre, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73793
2020-02-04 11:14:55 +00:00
Alex Richardson 1132f87fbf [update_cc_test_checks] Don't attach CHECK lines to function declarations
Previously we were adding the CHECK lines to both definitions and
declarations. Update the JSON AST dump parsing code to skip all
FunctionDecls without an "inner" node (i.e. no body).

Reviewed By: MaskRay, greened
Differential Revision: https://reviews.llvm.org/D73708
2020-02-04 08:41:26 +00:00
Hans Wennborg 1cc3db1a66 build_llvm_package.bat: Use a short form of the git revision 2020-02-03 16:40:10 +01:00
LLVM GN Syncbot 47f309d963 [gn build] Port c953409ff8 2020-02-03 05:24:55 +00:00
LLVM GN Syncbot 928090f5fe [gn build] Port a7bbe45a3e 2020-02-02 18:45:50 +00:00
Fangrui Song 9288bb8d20 [gn build] Delete stale AttributesCompatFunc after D72455/cfe87a4a16b73652dc06f9fa334137656991f13f 2020-02-02 10:07:05 -08:00
Tyker cfe87a4a16 [NFC] Refactor TableGen for attributes
Summary:
this patch makes tablegen generate llvm attributes in a more generic and simpler (at least to me).

changes:  make tablegen generate
...
ATTRIBUTE_ENUM(Alignment,align)
ATTRIBUTE_ENUM(AllocSize,allocsize)
...
which can be used to generate most of what was previously used and more.

Tablegen was also generating attributes from 2 identical files leading to identical output. so I removed one of them and made user use the other.

Reviewers: jdoerfert, thakis, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72455
2020-02-02 15:12:20 +01:00
Tyker 89d3b070c1 Revert "[NFC] Refactor TableGen for attributes"
This reverts commit 4dba14cf37.
2020-02-02 15:05:33 +01:00
Tyker 4dba14cf37 [NFC] Refactor TableGen for attributes
Summary:
this patch makes tablegen generate llvm attributes in a more generic and simpler (at least to me).

changes:  make tablegen generate
...
ATTRIBUTE_ENUM(Alignment,align)
ATTRIBUTE_ENUM(AllocSize,allocsize)
...
which can be used to generate most of what was previously used and more.

Tablegen was also generating attributes from 2 identical files leading to identical output. so I removed one of them and made user use the other.

Reviewers: jdoerfert, thakis, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72455
2020-02-02 14:50:31 +01:00
Nico Weber fac4bd26c3 [gn build] unbreak mac build after 133a31cef6 2020-01-31 21:25:56 -05:00
Nico Weber 133a31cef6 [gn build] add asan runtime on linux and mac
This produces a seemingly-working dynamic (x64-only) asan dylib on macOS
and static libraries on Linux.

I've had this sitting in a branch for a long time and wanted to get
check-asan working before landing it, but smaller patches and fewer
local branches is probably better.
2020-01-31 21:23:43 -05:00
LLVM GN Syncbot bf8357d420 [gn build] Port 16a0313ee3 2020-01-31 09:18:27 +00:00
LLVM GN Syncbot 8bb9642fd7 [gn build] Port 601687bf73 2020-01-30 15:06:10 +00:00
Hans Wennborg ef465d0ad2 test-release.sh: Add MLIR to the projects list 2020-01-30 14:31:02 +01:00
LLVM GN Syncbot 13e28b6a9a [gn build] Port f00be8da62 2020-01-30 12:56:31 +00:00
Christian Sigg a03ec58da6 Add GDB pretty printers for llvm::ilist, llvm::simple_ilist, and llvm::ilist_node.
Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: merge_guards_bot, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72589
2020-01-30 09:35:49 +01:00
LLVM GN Syncbot f0654875fb [gn build] Port f2af060700 2020-01-30 01:35:57 +00:00
Nico Weber 442d8e7a91 [gn build] add a FIXME about using /Gw on win 2020-01-29 19:12:08 -05:00
LLVM GN Syncbot e8e6e13176 [gn build] Port 5ea83eef4d 2020-01-29 21:19:26 +00:00
LLVM GN Syncbot 363289b542 [gn build] Port 24962ced81 2020-01-29 21:06:15 +00:00
LLVM GN Syncbot df8f2774b6 [gn build] Port 9a08a3fab9 2020-01-29 15:15:45 +00:00
Benjamin Kramer 8b6320c79d Address implicit conversions detected by g++ 5 only. 2020-01-29 01:01:09 +01:00
Benjamin Kramer 0d401fa36b Fix a couple more implicit conversions that Clang doesn't diagnose. 2020-01-29 00:42:56 +01:00
Benjamin Kramer adcd026838 Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with
std::string_view. There should be no functional change here.

This is mostly mechanical from a custom clang-tidy check, with a lot of
manual fixups. It uncovers a lot of minor inefficiencies.

This doesn't actually modify StringRef yet, I'll do that in a follow-up.
2020-01-28 23:25:25 +01:00
Nico Weber 776937c3e8 [gn build] (manually) port 90a10f00ff 2020-01-28 16:00:54 -05:00
LLVM GN Syncbot b8461fc0c7 [gn build] Port 2c03c899d5 2020-01-28 18:59:31 +00:00
LLVM GN Syncbot e7d5a8d0b4 [gn build] Port a928d127a5 2020-01-28 18:39:09 +00:00
LLVM GN Syncbot dc5777e514 [gn build] Port a32f894f17 2020-01-28 15:50:50 +00:00
Matt Arsenault d2a9b87fee TableGen: Try to fix expensive checks failures 2020-01-27 14:42:04 -05:00
Luke Drummond 482e890d1f [tablegen] Emit string literals instead of char arrays
This changes the generated (Instr|Asm|Reg|Regclass)Name tables from this
form:
    extern const char HexagonInstrNameData[] = {
      /* 0 */ 'G', '_', 'F', 'L', 'O', 'G', '1', '0', 0,
      /* 9 */ 'E', 'N', 'D', 'L', 'O', 'O', 'P', '0', 0,
      /* 18 */ 'V', '6', '_', 'v', 'd', 'd', '0', 0,
      /* 26 */ 'P', 'S', '_', 'v', 'd', 'd', '0', 0,
      [...]
    };

...to this:

    extern const char HexagonInstrNameData[] = {
      /* 0 */ "G_FLOG10\0"
      /* 9 */ "ENDLOOP0\0"
      /* 18 */ "V6_vdd0\0"
      /* 26 */ "PS_vdd0\0"
      [...]
    };

This should make debugging and exploration a lot easier for mortals,
while providing a significant compile-time reduction for common compilers.

To avoid issues with low implementation limits, this is disabled by
default for visual studio.

To force output one way or the other, pass
`--long-string-literals=<bool>` to `tablegen`

Reviewers: mstorsjo, rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D73044

A variation of this patch was originally committed in ce23515f5a and
then reverted in e464b31c due to build failures.
2020-01-27 18:22:25 +00:00
Christian Sigg 97431831e5 Add pretty printers for llvm::PointerIntPair and llvm::PointerUnion.
Reviewers: aprantl, dblaikie, jdoerfert, nicolasvasilache

Reviewed By: dblaikie

Subscribers: jpienaar, dexonsmith, merge_guards_bot, llvm-commits

Tags: #llvm, #clang, #lldb, #openmp

Differential Revision: https://reviews.llvm.org/D72557
2020-01-27 17:23:59 +01:00
LLVM GN Syncbot ef7f3af760 [gn build] Port dd8e0a0a23 2020-01-25 02:40:48 +00:00
Nico Weber 8d35c798f1 [gn build] (manually) merge 81b700e302 2020-01-24 21:40:26 -05:00
LLVM GN Syncbot da8bada938 [gn build] Port 8a81daaa8b 2020-01-24 21:42:43 +00:00
LLVM GN Syncbot 36b887ed15 [gn build] Port 3f8b100e94 2020-01-24 21:02:26 +00:00
Matt Arsenault 9c346464c1 TableGen/GlobalISel: Handle non-leaf EXTRACT_SUBREG
This previously only handled EXTRACT_SUBREGs from leafs, such as
operands directly in the original output. Handle extracting from a
result instruction.
2020-01-24 12:15:10 -08:00
Matt Arsenault d8328c0b62 TableGen: Work around assert on Mips register definitions
This would hit the "Biggest class wasn't first" assert in
getMatchingSubClassWithSubRegs in a future patch for EXTRACT_SUBREG
handling.

Mips defines 4 identical register classes (MSA128B, MSA128H, MSA128BW,
MSA128D). These have the same set of registers, and only differ by the
isel type. I believe this is an ill formed way of defining registers,
that probably is just to work around the inconvenience of mixing
different types in a single register class in DAG patterns.

Since these all have the same size, they would all sort to the
beginning, but you would not necessarily get the same super register
at the front as the assert enforces. Breaking the ambiguity by also
sorting by name doesn't work, since each of these register classes all
want to be first. Force sorting of the original register class if the
size is the same.
2020-01-24 12:15:10 -08:00
LLVM GN Syncbot 6530136fe3 [gn build] Port 555d8f4ef5 2020-01-24 19:37:54 +00:00
Sergej Jaskiewicz e464b31c15 Revert "[tablegen] Emit string literals instead of char arrays"
This reverts commit ce23515f5a.

That commit broke some builds on Windows:
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/13870
2020-01-23 18:22:22 +03:00
Luke Drummond ce23515f5a [tablegen] Emit string literals instead of char arrays
This changes the generated (Instr|Asm|Reg|Regclass)Name tables from this
form:
    extern const char HexagonInstrNameData[] = {
      /* 0 */ 'G', '_', 'F', 'L', 'O', 'G', '1', '0', 0,
      /* 9 */ 'E', 'N', 'D', 'L', 'O', 'O', 'P', '0', 0,
      /* 18 */ 'V', '6', '_', 'v', 'd', 'd', '0', 0,
      /* 26 */ 'P', 'S', '_', 'v', 'd', 'd', '0', 0,
      [...]
    };

...to this:

    extern const char HexagonInstrNameData[] = {
      /* 0 */ "G_FLOG10\0"
      /* 9 */ "ENDLOOP0\0"
      /* 18 */ "V6_vdd0\0"
      /* 26 */ "PS_vdd0\0"
      [...]
    };

This should make debugging and exploration a lot easier for mortals,
while providing a significant compile-time reduction for common compilers.

To avoid issues with low implementation limits, this is disabled by
default for visual studio or when cross-compiling.

To force output one way or the other, pass
`--long-string-literals=<bool>` to `tablegen`

Reviewers: mstorsjo, rnk

Subscribers: llvm-commit

Differential Revision: https://reviews.llvm.org/D73044
2020-01-23 13:57:20 +00:00
LLVM GN Syncbot d6a97b049f [gn build] Port 2f6987ba61 2020-01-23 13:34:12 +00:00
LLVM GN Syncbot 1b15965932 [gn build] Port dcff3961c2 2020-01-23 05:43:56 +00:00
Nico Weber 8f21acbf52 [gn build] reformat all build files again
Run `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`
after recent fixes to formatting of comments after single-element
lists.
2020-01-22 14:04:20 -05:00
Nico Weber bfcfa53c3d Revert "[gn build] [win] produce symbolized stack frames in release builds too"
This reverts commit fd98eccf98.
Seems to have no effect, need to try it locally for a bit first.
2020-01-22 12:54:19 -05:00
Nico Weber fd98eccf98 [gn build] [win] produce symbolized stack frames in release builds too 2020-01-22 12:36:38 -05:00
Nico Weber 349f6bb873 [gn build] (manually) port a174f0da62 2020-01-22 11:08:34 -05:00
LLVM GN Syncbot debd2dcd09 [gn build] Port e53a9d96e6 2020-01-22 04:19:38 +00:00
LLVM GN Syncbot 65a31a97b4 [gn build] Port fccd0da5ee 2020-01-21 13:36:16 +00:00
LLVM GN Syncbot 65f6ee618e [gn build] Port a80291ce10 2020-01-21 08:19:25 +00:00
LLVM GN Syncbot 0a71ac8494 [gn build] Port a42c3eb599 2020-01-20 17:09:12 +00:00
LLVM GN Syncbot 9ecfaad757 [gn build] Port 24b7b99b7d 2020-01-20 15:32:54 +00:00
Eric Astor 6ccebe0044 Fix build - removing legacy target reference. 2020-01-20 09:54:59 -05:00
Eric Astor 5f6dfa800e [ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mc
As discussed on the mailing list, I plan to introduce an ml-compatible MASM assembler as part of providing more of the Windows build tools. This will be similar to llvm-mc, but with different command-line parameters.

This placeholder is purely a stripped-down version of llvm-mc; we'll eventually add support for the Microsoft-style command-line flags, and back it with a MASM parser.

Relanding this revision after fixing ARM-compatibility issues.

Reviewers: rnk, thakis, RKSimon

Reviewed By: thakis, RKSimon

Differential Revision: https://reviews.llvm.org/D72679
2020-01-20 09:19:10 -05:00
LLVM GN Syncbot 4612e48d2f [gn build] Port a0f50d7316 2020-01-19 14:54:02 +00:00
Eric Astor 0eeddf1ac5 Revert "[ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mc"
This reverts commit 22af2cbefc, due to breakages on ARM platforms.
2020-01-18 09:51:40 -05:00
LLVM GN Syncbot 49dc3a9467 [gn build] Port d3db13af7e 2020-01-17 23:26:29 +00:00
Nico Weber 6afa0e88e3 [gn build] fix build after 22af2cbefc 2020-01-17 18:26:02 -05:00
Eric Astor 22af2cbefc [ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mc
Summary:
As discussed on the mailing list, I plan to introduce an ml-compatible MASM assembler as part of providing more of the Windows build tools. This will be similar to llvm-mc, but with different command-line parameters.

This placeholder is purely a stripped-down version of llvm-mc; we'll eventually add support for the Microsoft-style command-line flags, and back it with a MASM parser.

Reviewers: rnk, thakis

Reviewed By: thakis

Subscribers: merge_guards_bot, mgorny, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72679
2020-01-17 16:14:08 -05:00
LLVM GN Syncbot 73db4f6f11 [gn build] Port 42a0355816 2020-01-17 13:44:44 +00:00
Dmitri Gribenko 10b4aece52 Revert "Avoid creating an immutable map in the Automaton class."
This reverts commit 051d330314. It broke
buildbots, for example,
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/21908.
2020-01-17 10:20:36 +01:00
Hans Wennborg 0ab035ae50 Remove old Suversion release scripts 2020-01-17 09:35:34 +01:00
Marcello Maggioni 051d330314 Avoid creating an immutable map in the Automaton class.
Summary:
In the DFAPacketizer we copy the Transitions array
into a map in order to later access the transitions
based on a "Current State/Action" pair as a key.
This map lives in the Automaton object used by the DFAPacketizer.
It is never changed during the life of the object after
having been created during the creation of the Automaton
itself.

This map creation can make the creation of a DFAPacketizer
quite expensive if the target contains a considerable
amount of transition states.

Considering that TableGen already generates a
sorted list of transitions by State/Action pairs
we could just use that directly in our Automaton
and search entries with std::lower_bound instead of copying
it in a map and paying the execution time and memory cost.

Reviewers: jmolloy, ThomasRaoux

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72682
2020-01-16 18:44:20 -08:00
Nico Weber 1645f5e496 [gn build] replace llvm_allow_tardy_revision with llvm_append_vc_rev
Previously, the gn build would create VCSRevision.h / VCSVersion.h
files with some LLD_REVISION / LLVM_REVISION / CLANG_REVISION but
by default wouldn't add a dependency on .git/logs/HEAD so that
the step doesn't rerun after every branch switch or every pull.

That's bad for deterministic builds, and having --version print
some arbitrarily old revision isn't great either.

Instead, move to the model that the cmake build (now) uses fairly
consistently: If llvm_append_vc_rev is set, include the revision,
else don't.

Since the GN build is focused on developers, set llvm_append_vc_rev
to false instead of true by default (different from the cmake build),
so that things don't rebuild after every branch switch and every
pull.

While here, also remove some pre-monorepo code.

Differential Revision: https://reviews.llvm.org/D72859
2020-01-16 19:05:07 -05:00
LLVM GN Syncbot cbc63fbdc4 [gn build] Port d5c6b8407c 2020-01-16 21:35:08 +00:00
Matt Arsenault 03a592f18b TableGen/GlobalISel: Fix srcvalue inputs
Allow using srcvalue for discarding pattern inputs.
2020-01-16 13:49:43 -05:00
Nico Weber d51a15d86a [gn build] (manually) port bed7626f04 2020-01-16 13:19:39 -05:00
Nico Weber 5caa121295 [gn build] include revision information in lld --version output 2020-01-16 13:10:41 -05:00
LLVM GN Syncbot c29a9f64b7 [gn build] Port 6b35786649 2020-01-16 16:56:26 +00:00
Nico Weber 4b6d9ac392 Make lld cmake not compute commit revision twice
r354605 moved LLD to the unified revision handling introduced in
rL353268 / r352729 and removed uses of LLD_REPOSITORY_STRING and
LLD_REVISION_STRING.

After this change, we no longer compute the (now-unused) values
of these two variables.

Since this removes the only use of llvm/utils/GetRepositoryPath,
remove that too (it's redundant with the system added in r354605).

While here, also remove LLD_VERSION_MAJOR and LLD_VERSION_MINOR.
Their uses were removed in r285163.

Also remove LLD_VERSION from Version.inc which as far as I can
tell has been unused since the file was added in r219277.

No behavior change.

Differential Revision: https://reviews.llvm.org/D72803
2020-01-16 09:55:36 -05:00
LLVM GN Syncbot f8269bb072 [gn build] Port ed181efa17 2020-01-16 09:55:55 +00:00