Commit Graph

8570 Commits

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