9229 Commits

Author SHA1 Message Date
LLVM GN Syncbot
9112567bbd [gn build] Port e336b74c995 2020-09-25 12:13:19 +00:00
Zachary Turner
b3418cb4eb [lit] Support running tests on Windows without GnuWin32
Historically, we have told contributors that GnuWin32 is a pre-requisite
because our tests depend on utilities such as sed, grep, diff, and more.
However, Git on Windows includes versions of these utilities in its
installation.  Furthermore, GnuWin32 has not been updated in many years.
For these reasons, it makes sense to have the ability to run llvm tests
in a way that is both:
  a) Easier on the user (less stuff to install)
  b) More up-to-date (The verions that ship with git are at least as
     new, if not newer, than the versions in GnuWin32.

We add support for this here by attempting to detect where Git is
installed using the Windows registry, confirming the existence of
several common Unix tools, and then adding this location to lit's PATH
environment.

Differential Revision: https://reviews.llvm.org/D84380
2020-09-24 08:21:43 -04:00
Arthur Eubanks
11a75e6c92 [gn build] Allow option to build with asan/tsan/ubsan
Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D88056
2020-09-23 11:24:38 -07:00
Paul C. Anagnostopoulos
b3931188fd Enhance TableGen so that backends can produce better error messages.
Modify SearchableTableEmitter.cpp to take advantage.
Clean up formatting and capitalization issues.
2020-09-23 13:35:32 -04:00
LLVM GN Syncbot
5ae94047bf [gn build] Port 8a64689e264 2020-09-22 18:07:36 +00:00
LLVM GN Syncbot
a75f75415a [gn build] Port 848d66fafd2 2020-09-22 18:07:35 +00:00
LLVM GN Syncbot
9114d6cbda [gn build] Port af582c9b0f3 2020-09-22 06:47:54 +00:00
Baptiste Saleil
1372e23c7d [PowerPC] Add vector pair load/store instructions and vector pair register class
This patch adds support for the lxvp, lxvpx, plxvp, stxvp, stxvpx and pstxvp
instructions in the PowerPC backend. These instructions allow loading and
storing VSX register pairs. This patch also adds the VSRp register class
definition needed for these instructions.

Differential Revision: https://reviews.llvm.org/D84359
2020-09-21 10:27:47 -05:00
Simon Pilgrim
2174efb104 Update update_analyze_test_checks.py to support API changes from D83004 2020-09-21 16:09:05 +01:00
LLVM GN Syncbot
6d2bf5e3c8 [gn build] Port 4fc0214a101 2020-09-21 12:47:54 +00:00
Nico Weber
70409b2897 [gn build] Port 2124ca1d5cb 2020-09-19 08:34:58 -04:00
Nico Weber
ec9fb73277 [gn build] (manually) merge 2124ca1d5 2020-09-19 08:29:55 -04:00
Nico Weber
3618ac203f Revert "Revert "[gn build] (manually) port 9b6765e784b3" anf follow-ups"
This reverts commit 90fffdd0f705bfb480810cef087305567dc4f6cf.
The original change relanded.
2020-09-19 08:28:38 -04:00
Nico Weber
528a1f121c [gn build] (manually) port 5495b691646 2020-09-18 21:27:49 -04:00
Nico Weber
90fffdd0f7 Revert "[gn build] (manually) port 9b6765e784b3" anf follow-ups
9b6765e784b3 was reverted in 549e55b3d5634.

This reverts commit 442801a7b9b5460114498c48c12b8af40e495188.
This reverts commit 929d91a55616d4fcf4754044b063644807b87fbe.
This reverts commit 7c2d83347f4ea146af1aca72fe289294aaf212be.
2020-09-18 21:14:27 -04:00
Nico Weber
7502040ed2 clang: Make changes in 7c8bb409f31e py2.7-compatible 2020-09-18 16:15:37 -04:00
Nico Weber
7c2d83347f [gn build] add file i forgot to add in 929d91a55616 2020-09-18 16:01:00 -04:00
Nico Weber
929d91a556 [gn build] (manually) port 9b6765e784b3 more 2020-09-18 15:56:34 -04:00
Nico Weber
9b346f974e [gn build] Do not sync filenames containing variable references 2020-09-18 15:34:33 -04:00
Nico Weber
442801a7b9 [gn build] (manually) port 9b6765e784b3 2020-09-18 15:26:58 -04:00
Matt Arsenault
05c02eda45 emacs: Add nofree and willreturn to list of attributes 2020-09-18 09:48:33 -04:00
David Greene
7c8bb409f3 [UpdateCCTestChecks] Include generated functions if asked
Add the --include-generated-funcs option to update_cc_test_checks.py so that any
functions created by the compiler that don't exist in the source will also be
checked.

We need to maintain the output order of generated function checks so that
CHECK-LABEL works properly.  To do so, maintain a list of functions output for
each prefix in the order they are output.  Use this list to output checks for
generated functions in the proper order.

Differential Revision: https://reviews.llvm.org/D83004
2020-09-18 06:34:59 -05:00
Gabriel Hjort Åkerlund
c10200536f [TableGen][GlobalISel] Fix handling of zero_reg
When generating matching tables for GlobalISel, TableGen would output
"::zero_reg" whenever encountering the zero_reg, which in turn would
result in compilation error. This patch fixes that by instead outputting
NoRegister (== 0), which is the same result that TableGen produces when
generating matching tables for ISelDAG.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D86215
2020-09-18 11:01:11 +02:00
LLVM GN Syncbot
667762c64e [gn build] Port 7e4c6fb8546 2020-09-17 19:09:34 +00:00
Nico Weber
504697e6f4 [gn build] (manually) port c9af34027bc 2020-09-17 06:33:24 -04:00
LLVM GN Syncbot
0dd4d70ec2 [gn build] Port a895040eb02 2020-09-17 03:02:00 +00:00
LLVM GN Syncbot
436a43afb2 [gn build] Port b04c1a9d312 2020-09-17 01:54:10 +00:00
Nico Weber
0c6a56e41d [gn build] (manually) port 1321160a2 2020-09-16 18:29:07 -04:00
David Greene
ce0eb81c72 [UpdateTestChecks] Allow $ in function names
Some compilers generation functions with '$' in their names, so recognize those
functions.

This also requires recognizing function names inside quotes in some contexts in
order to escape certain characters.

Differential Revision: https://reviews.llvm.org/D82995
2020-09-16 14:34:18 -05:00
LLVM GN Syncbot
2a078a977e [gn build] Port 56069b5c71c 2020-09-16 19:03:25 +00:00
Nico Weber
15c378f6e6 [gn build] unconfuse sync script about "sources = []" in clang/lib/Headers/BUILD.gn 2020-09-16 14:50:29 -04:00
Johannes Doerfert
dbde3969ba [UpdateTestChecks][NFC] Fix spelling 2020-09-16 13:37:08 -05:00
Nico Weber
b3d33f5e83 [gn build] make "all" target build
If you want to build everything, building the default target
via just `ninja` is better, but `ninja all` shouldn't give you
compile errors -- this fixes that.
2020-09-16 14:21:48 -04:00
Ta-Wei Tu
38ecd61619 [TableGen] Fix invalid comparison function SizeOrder in getMatchingSubClassWithSubRegs
Building LLVM with -DEXPENSIVE_CHECKS fails with the following error
message with libstdc++ in debug mode:

Error: comparison doesn't meet irreflexive requirements,
assert(!(a < a)).

The patch fixes the comparison function SizeOrder by returning false
when comparing two equal items.
2020-09-15 15:48:43 -04:00
LLVM GN Syncbot
32a61531b8 [gn build] Port 3d42d549554 2020-09-15 18:32:17 +00:00
LLVM GN Syncbot
c0809f8d79 [gn build] Port cd4edf94cd4 2020-09-15 13:32:48 +00:00
LLVM GN Syncbot
46dc41e1ef [gn build] Port a8058c6f8d1 2020-09-15 13:32:47 +00:00
Nico Weber
57752b1449 [gn build] (semi-manually) port 380e746bcca 2020-09-15 09:25:30 -04:00
Florian Hahn
cd4edf94cd Recommit "[ConstraintSystem] Add helpers to deal with linear constraints."
This patch recommits "[ConstraintSystem] Add helpers to deal with linear constraints."
(it reverts the revert commit 8da6ae4ce1b686c5c13698e4c5ee937811fda6f7).

The reason for the revert was using __builtin_multiply_overflow, which
is not available for all compilers. The patch has been updated to use
MulOverflow from MathExtras.h
2020-09-15 12:07:26 +01:00
Arthur Eubanks
10b12d4035 Reland [docs][NewPM] Add docs for writing NPM passes
As to not conflict with the legacy PM example passes under
llvm/lib/Transforms/Hello, this is under HelloNew. This makes the
CMakeLists.txt and general directory structure less confusing for people
following the example.

Much of the doc structure was taken from WritinAnLLVMPass.rst.

This adds a HelloWorld pass which simply prints out each function name.

More will follow after this, e.g. passes over different units of IR, analyses.
https://llvm.org/docs/WritingAnLLVMPass.html contains a lot more.

Relanded with missing "Support" dependency in LLVMBuild.txt.

Reviewed By: ychen, asbirlea

Differential Revision: https://reviews.llvm.org/D86979
2020-09-14 16:06:19 -07:00
Arthur Eubanks
39ec36415d Revert "[docs][NewPM] Add docs for writing NPM passes"
This reverts commit c2590de30df23ef0db39b496cdec62a83a61fbfa.

Breaks shared libs build
2020-09-14 15:55:17 -07:00
Arthur Eubanks
c2590de30d [docs][NewPM] Add docs for writing NPM passes
As to not conflict with the legacy PM example passes under
llvm/lib/Transforms/Hello, this is under HelloNew. This makes the
CMakeLists.txt and general directory structure less confusing for people
following the example.

Much of the doc structure was taken from WritinAnLLVMPass.rst.

This adds a HelloWorld pass which simply prints out each function name.

More will follow after this, e.g. passes over different units of IR, analyses.
https://llvm.org/docs/WritingAnLLVMPass.html contains a lot more.

Reviewed By: ychen, asbirlea

Differential Revision: https://reviews.llvm.org/D86979
2020-09-14 13:26:03 -07:00
LLVM GN Syncbot
2ad38f7a46 [gn build] Port 226d80ebe20 2020-09-14 20:16:21 +00:00
Petar Avramovic
416346d1ca AMDGPU/GlobalISel/Emitter Recognize additional 'same operand checks'
The "name" of a non-leaf complex pattern (MY_PAT $op1, $op2) is
"MY_PAT:op1:op2" and the ones with same "name" represent same operand.
Add 'same operand check' for this case.

Differential Revision: https://reviews.llvm.org/D87351
2020-09-14 12:10:59 +02:00
LLVM GN Syncbot
119e57be76 [gn build] Port 30667c967d3 2020-09-14 08:53:33 +00:00
Petar Avramovic
09b8871f8d AMDGPU/GlobalISel/Emitter Support for predicate code that uses operands
Predicates with 'let PredicateCodeUsesOperands = 1' want to examine
matched operands. When we encounter predicate code that uses operands,
analyze its named operand arguments and create a map between argument
index and name. Later, when leaf node with name is encountered, emit
GIM_RecordNamedOperand that will store that operand at its argument
index in operand list. This operand list will be an argument to c++
code of the predicate.

Differential Revision: https://reviews.llvm.org/D87285
2020-09-14 10:39:56 +02:00
LLVM GN Syncbot
70daa353e2 [gn build] Port cc2da5554b5 2020-09-12 23:13:20 +00:00
LLVM GN Syncbot
4ede83c068 [gn build] Port 19531a81f1d 2020-09-12 10:08:18 +00:00
LLVM GN Syncbot
0e0d93e2f0 [gn build] Port ad99e34c59b 2020-09-12 01:54:23 +00:00
Reid Kleckner
12a281d368 [gn] Remove unneeded MC dep from llvm-tblgen
Tablegen does not have link time dependencies on MC. Having llvm-tblgen
depend on it causes it to be rebuilt in the gn build every time somebody
touches any cpp file in llvm/lib/MC* or llvm/lib/DebugInfo/Codeview*.
Touching tablegen invalidates most of the rest of the build, and
re-running it takes a while. This is is annoying for me when swapping
between branches that touch CodeView logic.

This dep was added to LLVMBuild.txt back in 2018, and presumably it was
carried over into the gn build.

Differential Revision: https://reviews.llvm.org/D87553
2020-09-11 18:28:49 -07:00