7434 Commits

Author SHA1 Message Date
Nico Weber
b23265474e gn build: Merge r357047
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357071 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-27 15:10:47 +00:00
Nico Weber
7b01616565 gn build: Add build files for clang-include-fixer and find-all-symbols
Differential Revision: https://reviews.llvm.org/D59838

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357042 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-27 00:17:05 +00:00
Nico Weber
f50526b270 gn build: Format all build files
Re-ran `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357021 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-26 19:16:28 +00:00
Nico Weber
10ee5d422d gn build: Merge r356929 (effectively relands r353518, reverted in r353621)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357019 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-26 18:55:37 +00:00
Tom Stellard
08e5a72001 merge-request.sh: Update 8.0 metabug for 8.0.1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356924 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-25 17:01:29 +00:00
Alexander Kornienko
f694319233 [clang-tidy] Separate the check-facing interface
Summary:
Move ClangTidyCheck to a separate header/.cpp
Switch checks to #include "ClangTidyCheck.h"
Mention ClangTidyCheck.h in the docs

Reviewers: hokein, gribozavr, aaron.ballman

Reviewed By: hokein

Subscribers: mgorny, javed.absar, xazax.hun, arphaman, jdoerfert, llvm-commits, cfe-commits

Tags: #clang, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356890 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-25 12:36:30 +00:00
Nico Weber
a0a20fdec3 gn build: Clean up README.rst a bit
- Make introduction a bit shorter
- Add a `git clone` step to Quick start
- Put command to run first in each of the Quick start steps
- Use ``code`` instead of `label` throughout; this is .rst not .md

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356885 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-25 11:33:19 +00:00
Nico Weber
af179cc68e gn build: Let get.py keep zip file in memory instead of using a temp file
The zip is small, and it's a bit less code this way.
No intended behavior change.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356884 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-25 11:32:27 +00:00
Nico Weber
5646c0a792 gn build: Merge r356820
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356846 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-23 23:22:45 +00:00
Nico Weber
025a2dcaff gn build: Add build files for modularize and pp-trace
Differential Revision: https://reviews.llvm.org/D59701

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356845 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-23 23:16:41 +00:00
Vitaly Buka
1fb71691ed [gn] Add clang-tools-extra/clang-tidy/tool/BUILD.gn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356828 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-23 02:31:23 +00:00
Vitaly Buka
82921a136c [gn] Add clang-tools-extra/clang-tidy/tool/BUILD.gn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356827 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-23 02:20:48 +00:00
Nico Weber
b884c5db34 Make clang-move use same file naming convention as other tools
In all the other clang-foo tools, the main library file is called
Foo.cpp and the file in the tool/ folder is called ClangFoo.cpp.
Do this for clang-move too.

No intended behavior change.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356780 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-22 16:34:39 +00:00
Nico Weber
d6235de033 gn build: Merge r356750
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356772 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-22 16:00:16 +00:00
Nico Weber
cda5303cf2 gn build: Merge r356570
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356771 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-22 15:58:33 +00:00
Nico Weber
bf41b04739 gn build: Merge r356662
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356770 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-22 15:56:33 +00:00
Nico Weber
bb7534533b gn build: Merge r356692
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356769 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-22 15:54:29 +00:00
Nico Weber
6e1d5e79bc gn build: Merge r356753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356767 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-22 15:50:24 +00:00
Nico Weber
2943ef684f gn build: Merge r356652 (and follow-up r56655)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356766 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-22 15:48:11 +00:00
Nico Weber
abfc7b0758 gn build: Merge r356729
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356765 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-22 15:43:06 +00:00
Nico Weber
b0941775f0 Remove HAVE_REALPATH from config.h
Its last use was removed in r352916.
No behavior change.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356579 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-20 17:26:11 +00:00
Nico Weber
b8014cec30 gn build: Add build files for some clang-tools-extra
Adds clang-change-namespace, clang-move, clang-query,
clang-reorder-fields.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356567 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-20 16:14:16 +00:00
Nico Weber
6c730c69df gn build: Merge r356508
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356563 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-20 15:41:25 +00:00
Nico Weber
0e7dac6a2f gn build: Merge r356519
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356560 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-20 15:36:11 +00:00
Peter Collingbourne
861cde1460 gn build: Merge r356387.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356485 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-19 17:30:59 +00:00
Peter Collingbourne
57757dd059 gn build: Merge r356451.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356484 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-19 17:30:50 +00:00
Serge Guelton
1f6df780ec Use response file when generating LLVM-C.dll
As discovered in D56774 the command line gets to long, so use a response file
to give the script the libs. This change has been tested and is confirmed
working for me.

Commited on behalf of Jakob Bornecrantz.
Differential Revision: https://reviews.llvm.org/D56781



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356443 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-19 09:14:09 +00:00
Craig Topper
ca0ea067ee [X86] Allow any 8-bit immediate to be used with BT/BTC/BTR/BTS not just sign extended 8-bit immediates.
We need to allow [128,255] in addition to [-128, 127] to match gas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356413 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-18 21:33:59 +00:00
Craig Topper
2b24b93a59 [X86] Remove the _alt forms of (V)CMP instructions. Use a combination of custom printing and custom parsing to achieve the same result and more
Similar to previous change done for VPCOM and VPCMP

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356384 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-18 17:59:59 +00:00
Craig Topper
7e35449366 [X86] Add ADD8ri_DB and ADD8rr_DB to the autogenerated load folding table.
These were added in r355423.

We only use the autogenerated table to assist with the maintenance of the
manual table. These entries are alreayd in the manual table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356357 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-18 05:48:19 +00:00
Tim Renouf
b68313482b [CodeGen] Defined MVTs v3i32, v3f32, v5i32, v5f32
AMDGPU would like to use these MVTs.

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

Change-Id: I6125fea810d7cc62a4b4de3d9904255a1233ae4e

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356351 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-17 22:56:38 +00:00
Craig Topper
799ecd6eba [X86] Remove the _alt forms of AVX512 VPCMP instructions. Use a combination of custom printing and custom parsing to achieve the same result and more
Similar to the previous patch for VPCOM.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356344 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-17 21:21:40 +00:00
Craig Topper
826addddb1 [X86] Remove the _alt forms of XOP VPCOM instructions. Use a combination of custom printing and custom parsing to achieve the same result and more
Previously we had a regular form of the instruction used when the immediate was 0-7. And _alt form that allowed the full 8 bit immediate. Codegen would always use the 0-7 form since the immediate was always checked to be in range. Assembly parsing would use the 0-7 form when a mnemonic like vpcomtrueb was used. If the immediate was specified directly the _alt form was used. The disassembler would prefer to use the 0-7 form instruction when the immediate was in range and the _alt form otherwise. This way disassembly would print the most readable form when possible.

The assembly parsing for things like vpcomtrueb relied on splitting the mnemonic into 3 pieces. A "vpcom" prefix, an immediate representing the "true", and a suffix of "b". The tablegenerated printing code would similarly print a "vpcom" prefix, decode the immediate into a string, and then print "b".

The _alt form on the other hand parsed and printed like any other instruction with no specialness.

With this patch we drop to one form and solve the disassembly printing issue by doing custom printing when the immediate is 0-7. The parsing code has been tweaked to turn "vpcomtrueb" into "vpcomb" and then the immediate for the "true" is inserted either before or after the other operands depending on at&t or intel syntax.

I'd rather not do the custom printing, but I tried using an InstAlias for each possible mnemonic for all 8 immediates for all 16 combinations of element size, signedness, and memory/register. The code emitted into printAliasInstr ended up checking the number of operands, the register class of each operand, and the immediate for all 256 aliases. This was repeated for both the at&t and intel printer. Despite a lot of common checks between all of the aliases, when compiled with clang at least this commonality was not well optimized. Nor do all the checks seem necessary. Since I want to do a similar thing for vcmpps/pd/ss/sd which have 32 immediate values and 3 encoding flavors, 3 register sizes, etc. This didn't seem to scale well for clang binary size. So custom printing seemed a better trade off.

I also considered just using the InstAlias for the matching and not the printing. But that seemed like it would add a lot of extra rows to the matcher table. Especially given that the 32 immediates for vpcmpps have 46 strings associated with them.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356343 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-17 21:21:37 +00:00
Peter Collingbourne
c9ba0947cd gn build: Merge r356305.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356314 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-16 03:46:02 +00:00
Peter Collingbourne
5bb6ba601e gn build: Add missing dependency to check-clang target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356306 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-15 22:47:34 +00:00
Sam Clegg
2b070724f7 Line wrap README file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356204 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-14 21:09:14 +00:00
Nico Weber
a41868aa77 gn build: Add build files for clang-doc
Differential Revision: https://reviews.llvm.org/D59379

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356199 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-14 20:41:19 +00:00
Hans Wennborg
d7620a3317 gn build: Merge r356080
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356139 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-14 12:22:50 +00:00
Hans Wennborg
f012e914c8 gn build: Merge r356082
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356128 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-14 10:10:25 +00:00
Paul Hoad
4361ad0ab2 Revert "[clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present"
This reverts commit b358cbb9b78389e20f7be36e1a98e26515c3ecce.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356030 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-13 08:15:03 +00:00
Paul Hoad
cb6651ae9d [clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present
Summary:
Addressing: PR25010 - https://bugs.llvm.org/show_bug.cgi?id=25010

Code like:

```
    if(true) var++;
    else  {
        var--;
    }
```

is reformatted to be

```
  if (true)
    var++;
  else {
    var--;
  }
```

Even when `AllowShortIfStatementsOnASingleLine` is true

The following revision comes from a +1'd suggestion in the PR to support AllowShortIfElseStatementsOnASingleLine

This suppresses the clause prevents the merging of the if when there is a compound else

Reviewers: klimek, djasper, JonasToth, alexfh, krasimir, reuk
Reviewed By: reuk
Subscribers: reuk, Higuoxing, jdoerfert, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D59087

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356029 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-13 08:07:46 +00:00
Matt Arsenault
6e8fb99b69 IR: Add immarg attribute
This indicates an intrinsic parameter is required to be a constant,
and should not be replaced with a non-constant value.

Add the attribute to all AMDGPU and generic intrinsics that comments
indicate it should apply to. I scanned other target intrinsics, but I
don't see any obvious comments indicating which arguments are intended
to be only immediates.

This breaks one questionable testcase for the autoupgrade. I'm unclear
on whether the autoupgrade is supposed to really handle declarations
which were never valid. The verifier fails because the attributes now
refer to a parameter past the end of the argument list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355981 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-12 21:02:54 +00:00
Raphael Isemann
3c8560f7a3 Fix git-llvm crashing when trying to remove directory while cleaning
Summary:
I'm trying to push D59198 but it seems that `git-llvm push` can't handle the fact
that I add a new directory in the patch:

```
> git llvm push -n
Pushing 1 commit:
  e7c0a9bd136 Correctly look up declarations in inline namespaces
Traceback (most recent call last):
  File "llvm/utils/git-svn//git-llvm", line 431, in <module>
    args.func(args)
  File "llvm/utils/git-svn//git-llvm", line 385, in cmd_push
    clean_svn(svn_root)
  File "llvm/utils/git-svn//git-llvm", line 201, in clean_svn
    os.remove(os.path.join(svn_repo, filename))
IsADirectoryError: [Errno 21] Is a directory: '.git/llvm-upstream-svn/lldb/trunk/packages/Python/lldbsuite/test/expression_command/inline-namespace'
```

This patch just uses shutil to delete the directory instead of trying to use `os.remove`
which only works for files.

Reviewers: mehdi_amini, jlebar

Reviewed By: jlebar

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355896 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-12 07:40:54 +00:00
Evgeniy Stepanov
cc5a8c21af Remove ASan asm instrumentation.
Summary: It is incomplete and has no users AFAIK.

Reviewers: pcc, vitalybuka

Subscribers: srhines, kubamracek, mgorny, krytarowski, eraman, hiraditya, jdoerfert, #sanitizers, llvm-commits, thakis

Tags: #sanitizers, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355870 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-11 21:50:10 +00:00
Nico Weber
a44000a1a8 Remove esan.
It hasn't seen active development in years, and it hasn't reached a
state where it was useful.

Remove the code until someone is interested in working on it again.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355862 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-11 20:23:40 +00:00
Nico Weber
b3804eeeac gn build: Merge r355777
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355857 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-11 19:30:13 +00:00
Nico Weber
9644531df4 gn build: Merge r355835
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355856 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-11 19:14:22 +00:00
Nico Weber
079d1d896c gn build: Merge r355834
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355855 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-11 19:11:15 +00:00
Stanislav Mekhanoshin
5d5019bab2 Use bitset for assembler predicates
AMDGPU target run out of Subtarget feature flags hitting the limit of 64.
AssemblerPredicates uses at most uint64_t for their representation.
At the same time CodeGen has exhausted this a long time ago and switched
to a FeatureBitset with the current limit of 192 bits.

This patch completes transition to the bitset for feature bits extending
it to asm matcher and MC code emitter.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355839 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-11 17:04:35 +00:00
Craig Topper
1063a019c3 [TableGen] Replace a dyn_cast with isa to avoid an unused variable warning introduced in r355785. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355837 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-11 16:51:37 +00:00