Commit Graph

267582 Commits

Author SHA1 Message Date
Jonas Paulsson be7a7e4979 [SystemZ] test update
test/CodeGen/SystemZ/loop-01.ll was incorrectly updated by r308729.

llvm-svn: 308736
2017-07-21 13:14:17 +00:00
Alex Lorenz 61ea7b9096 Clang's tests should depend on clang-diff
llvm-svn: 308735
2017-07-21 13:12:01 +00:00
Alex Lorenz 4c0a86608f Fix another compiler error from r308731
std::pair in emplace back couldn't be constructed because SNodeId has an
explicit constructor. Not sure how this even compiled on my machine before.

llvm-svn: 308734
2017-07-21 13:04:57 +00:00
Alex Lorenz 158063e4de Fix tuple construction compiler error from r308731
llvm-svn: 308733
2017-07-21 12:57:40 +00:00
Pavel Labath 28e1335d12 XFail TestWithModuleDebugging on linux (bug 33875)
llvm-svn: 308732
2017-07-21 12:51:37 +00:00
Alex Lorenz a75b2cac71 [clang-diff] Add initial implementation
This is the first commit for the "Clang-based C/C++ diff tool" GSoC project.

ASTDiff is a new library that computes a structural AST diff between two ASTs
using the gumtree algorithm. Clang-diff is a new Clang tool that will show
the structural code changes between different ASTs.

Patch by Johannes Altmanninger!

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

llvm-svn: 308731
2017-07-21 12:49:28 +00:00
Jonas Paulsson 024e319489 [SystemZ, LoopStrengthReduce]
This patch makes LSR generate better code for SystemZ in the cases of memory
intrinsics, Load->Store pairs or comparison of immediate with memory.

In order to achieve this, the following common code changes were made:

 * New TTI hook: LSRWithInstrQueries(), which defaults to false. Controls if
 LSR should do instruction-based addressing evaluations by calling
 isLegalAddressingMode() with the Instruction pointers.
 * In LoopStrengthReduce: handle address operands of memset, memmove and memcpy
 as address uses, and call isFoldableMemAccessOffset() for any LSRUse::Address,
 not just loads or stores.

SystemZ changes:

 * isLSRCostLess() implemented with Insns first, and without ImmCost.
 * New function supportedAddressingMode() that is a helper for TTI methods
 looking at Instructions passed via pointers.

Review: Ulrich Weigand, Quentin Colombet
https://reviews.llvm.org/D35262
https://reviews.llvm.org/D35049

llvm-svn: 308729
2017-07-21 11:59:37 +00:00
Igor Kudrin 7d2b15a7ab [ELF] Avoid data race in ObjectFile<ELFT>::getDILineInfo().
Differential Revision: https://reviews.llvm.org/D35537

llvm-svn: 308728
2017-07-21 11:26:08 +00:00
Siddharth Bhat a0fb8b23e1 [NFC] [PPCGCodeGeneration] Print `verifyModule` failure to debug stream.
If verifyModule fails, it is helpful to know why it failed. Add a log to
the debug stream that prints the failure.

llvm-svn: 308727
2017-07-21 11:21:44 +00:00
Alexander Kornienko 16300e1265 [clang-tidy] Add option to export fixes to run-clang-tidy.py
This patch adds the option to keep the list of proposed fixes even though they
should not be applied.

This allows to detect possible fixes using the parallelised run-clang-tidy.py
and apply them using clang-apply-replacements at a later time.
Essentially the patch causes the individual temporary yaml files by the parallel
clang-tidy instances to be merged into one user-defined file.

Patch by Michael F. Herbst!
Differential revision: https://reviews.llvm.org/D31326

llvm-svn: 308726
2017-07-21 10:31:26 +00:00
Krasimir Georgiev 06451fa1a2 [clang-format] Fix comment levels between '}' and PPDirective
Summary:
This fixes a regression exposed by r307795 in which the level of a comment line
between '}' and a preprocessor directive is incorrectly set as the level of the
line before the '}'. In effect, this:
```
int f(int i) {
  int j = i;
  return i + j;
}
// comment

#ifdef A
#endif
```
was formatted as:
```
int f(int i) {
  int j = i;
  return i + j;
}
  // comment

#ifdef A
#endif
```

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 308725
2017-07-21 10:26:13 +00:00
Simon Pilgrim 84cbd8e750 [X86][SSE] Add extra (sra (sra x, c1), c2) -> (sra x, (add c1, c2)) test case
We should be able to handle the case where some c1+c2 elements exceed max shift and some don't by performing a clamp after the sum

llvm-svn: 308724
2017-07-21 10:22:49 +00:00
Simon Pilgrim 32c377a1cf [X86][SSE] Add pre-AVX2 support for (i32 bitcast(v32i1)) -> 2xMOVMSK
Currently we only support (i32 bitcast(v32i1)) using the AVX2 VPMOVMSKB ymm instruction.

This patch adds support for splitting pre-AVX2 targets into 2 x (V)PMOVMSKB xmm instructions and merging the integer results.

In future we could probably generalize this to handle more cases.

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

llvm-svn: 308723
2017-07-21 09:58:50 +00:00
Ilya Biryukov b6d1ec8073 Fixed failing assert in code completion.
Summary:
The code was accessing uninstantiated default argument.
This resulted in failing assertion at ParmVarDecl::getDefaultArg().

Reviewers: erikjv, klimek, bkramer, krasimir

Reviewed By: krasimir

Subscribers: cfe-commits

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

llvm-svn: 308722
2017-07-21 09:24:00 +00:00
Ilya Biryukov ba3bd7ce3e [clangd] Specified --gcc-toolchain explicitly in VFS test.
In order to avoid platform-specific configuration quirks.
(Possible fix for https://bugs.llvm.org/show_bug.cgi?id=33842)

llvm-svn: 308721
2017-07-21 08:20:47 +00:00
Simon Atanasyan d5c937b3a3 [mips] Add `short_call` to the set of `long_call/far/near` attributes
MIPS gcc supports `long_call/far/near` attributes only, but other
targets have the `short_call` attribut, so let's support it for MIPS
for consistency.

llvm-svn: 308719
2017-07-21 08:10:57 +00:00
Bruce Mitchener 2b13913b12 Fix typo in error message in 'platform status'.
llvm-svn: 308716
2017-07-21 07:08:20 +00:00
Tobias Grosser 018103d34e Fix typo in function name Bllock -> Block
llvm-svn: 308715
2017-07-21 06:00:38 +00:00
Richard Trieu 4538a5abb0 Fix tblgen error.
tblgen couldn't determing a unique name between "long_call" and "far", so it
errored out when generating documentation.  Copy the documentation, and give
an explicit header for "long_call".

llvm-svn: 308714
2017-07-21 04:56:48 +00:00
Philipp Schaad a81d23030f Commit access test
llvm-svn: 308712
2017-07-21 03:51:01 +00:00
Eric Beckmann 54137ed125 Only use xml if iconv is found, which is a prerequisite.
llvm-svn: 308711
2017-07-21 02:13:02 +00:00
Adrian Prantl 98dc599790 dsymutil: strip unused types from imported DW_TAG_modules
This patch teaches dsymutil to strip types from the imported
DW_TAG_module inside of an object file (not inside the PCM) if they
can be resolved to the full definition inside the PCM. This reduces
the size of the .dSYM from WebCore from webkit.org by almost 2/3.

<rdar://problem/33047213>

llvm-svn: 308710
2017-07-21 02:07:33 +00:00
Adrian Prantl 65e7ca995d Debug Info: Don't strip clang module skeleton CUs.
This corrects a (hopefully :-) accidental side-effect of r304020.

rdar://problem/33442618

llvm-svn: 308708
2017-07-21 01:24:05 +00:00
Petr Hosek eb4127ffb5 [Driver] Consider -fno-sanitize=... state when filtering out -fsanitize-coverage=...
The driver ignores -fsanitize-coverage=... flags when also given
-fsanitize=... flags for sanitizer flavors that don't support the
coverage runtime. This logic failed to account for subsequent
-fno-sanitize=... flags that disable the sanitizer flavors that
conflict with -fsanitize-coverage=... flags.

Patch by Roland McGrath

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

llvm-svn: 308707
2017-07-21 01:17:49 +00:00
Petr Hosek 8b591f592b [ELF] Remove processNonSectionCommands
This method is no longer being used anywhere.

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

llvm-svn: 308706
2017-07-21 01:02:30 +00:00
Petr Hosek 0f874d4ba5 [CMake] Use ABI version 2 for C++ library in Fuchsia
Fuchsia has always been using ABI version 2 but I forgot this option
when setting up the cache file for runtimes build.

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

llvm-svn: 308705
2017-07-21 00:59:38 +00:00
Spyridoula Gravani c6ef9873ac [DWARF] Generalized verification of .debug_abbrev to be applicable to both .debug_abbrev and .debug_abbrev.dwo sections.
Differential Revision: https://reviews.llvm.org/D35698

llvm-svn: 308703
2017-07-21 00:51:32 +00:00
Craig Topper 31140ade70 [AVX-512] Fix a bug that prevented some non-temporal loads from using the movntdqa instruction.
The bitconverts here had an input type of 128-bits and an output type of 256 bits. The input type should also have been 256 bits.

llvm-svn: 308702
2017-07-21 00:40:42 +00:00
Dean Michael Berris d8e12128dc [XRay][compiler-rt] Update test to account for change in logging format.
Fixes build breakage for some bots after we've started logging both the
process id and the thread id.

llvm-svn: 308701
2017-07-21 00:30:04 +00:00
Eric Beckmann c12c5487e2 Explicitly disable libxml2 on android.
llvm-svn: 308699
2017-07-20 23:54:51 +00:00
George Karpenkov abb5476df4 Generate a compile_commands.json DB for external projects.
compile_commands.json file is very useful both for tooling and for
reproducible builds.
For files generated from recursive CMake invocation this information was
not previously generated.

Differential Review: https://reviews.llvm.org/D35219

llvm-svn: 308698
2017-07-20 23:46:46 +00:00
Evandro Menezes 55459609c8 [AArch64] Adjust the cost model for Exynos M1 and M2
Add the cost for the EXT instructions and explicitly add the cost for a few
instructions that were implied by the coarse model.

llvm-svn: 308697
2017-07-20 23:41:50 +00:00
Eric Beckmann 75cb8af7ff Only defined CombinedRoot if libxml2 is used.
llvm-svn: 308694
2017-07-20 23:14:12 +00:00
NAKAMURA Takumi 0c7d6ef459 Whitespace.
llvm-svn: 308693
2017-07-20 23:12:39 +00:00
Petr Hosek 039fb8c296 [ELF] Align the value if needed when computing the expression
Also add the test cases for the addition and subtraction both for
the relative and absolute case.

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

llvm-svn: 308692
2017-07-20 23:11:47 +00:00
Kevin Enderby b4c351dfd1 lld matching change for llvm change r308690 to add error handling to
the dyld compact export entries in libObject.

llvm-svn: 308691
2017-07-20 23:09:19 +00:00
Kevin Enderby 3e95bd2239 Add error handling to the dyld compact export entries in libObject.
lld needs a matching change for this will be my next commit.
Expect it to fail build until that matching commit is picked up by the bots.

Like the changes in r296527 for dyld bind entires and the changes in
r298883 for lazy bind, weak bind and rebase entries the export
entries are the last of the dyld compact info to have error handling added.

This follows the model of iterators that can fail that Lang Hanes
designed when fixing the problem for bad archives r275316 (or r275361).

So that iterating through the exports now terminates if there is an error
and returns an llvm::Error with an error message in all cases for malformed
input.

This change provides the plumbing for the error handling, all the needed
testing of error conditions and test cases for all of the unique error messages.

llvm-svn: 308690
2017-07-20 23:08:41 +00:00
Eric Beckmann b5e9070388 Only enable libxml2 on linux, because systems like android lack libiconv
llvm-svn: 308689
2017-07-20 23:02:49 +00:00
Tim Northover 7b6d66c0c9 Recommit: GlobalISel: select G_EXTRACT and G_INSERT instructions on AArch64.
It revealed a bug in the Localizer pass which has now been fixed.

This includes the fix for SUBREG_TO_REG committed separately last time.

llvm-svn: 308688
2017-07-20 22:58:38 +00:00
Tim Northover 071d77a51f GlobalISel: stop localizer putting constants before EH_LABELs
If the localizer pass puts one of its constants before the label that tells the
unwinder "jump here to handle your exception" then control-flow will skip it,
leaving uninitialized registers at runtime. That's bad.

llvm-svn: 308687
2017-07-20 22:58:26 +00:00
Rui Ueyama 800cd3ec40 Add a missing tool dependency.
This dependency was introduced in r308681.

llvm-svn: 308686
2017-07-20 22:39:31 +00:00
Rui Ueyama 1b5353b662 Make a file end with n and remove trailing whitespace.
llvm-svn: 308685
2017-07-20 22:39:20 +00:00
Krasimir Georgiev 22d7e6b08d [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs
Reviewers: mprobst

Reviewed By: mprobst

Subscribers: cfe-commits, klimek

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

llvm-svn: 308684
2017-07-20 22:29:39 +00:00
Simon Dardis 9f1d5d8cd5 [mips] Add support for -m(no-)local-sdata
Teach the driver to support -mlocal-sdata. The backend already matches GCC's
default behaviour.

Reviewers: atanasyan, slthakur

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

llvm-svn: 308683
2017-07-20 22:23:21 +00:00
Eric Beckmann c35c34a7f9 Make tests always depend on llvm-mt, because some tests are run even w/o
xml2.

llvm-svn: 308682
2017-07-20 22:13:16 +00:00
Rafael Espindola 2bd185bcde Fix symbol type with icf.
We were not looking at Repl and so thinking there was no output
section associated with the merged symbol. Because of that it was
produced as absolute.

This was found by an internal round of testing.

llvm-svn: 308681
2017-07-20 21:55:40 +00:00
Rui Ueyama bc2c9e0278 Do not strip SHF_GROUP in elf::decompressAndMergeSections().
SHF_GROUP flag should have been removed when the control reaches here
because InputSectionBase turns the flag off. So this code should be
redundant.

llvm-svn: 308680
2017-07-20 21:42:30 +00:00
Eric Beckmann 7d50c389c4 Implement parsing and writing of a single xml manifest file.
Summary: Implement parsing and writing of a single xml manifest file.

Subscribers: mgorny, llvm-commits, hiraditya

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

llvm-svn: 308679
2017-07-20 21:42:04 +00:00
Alexander Shaposhnikov eaf833ca2b [clang-tools-extra] Add support for plain C structs in clang-reorder-fields
This diff updates the tool clang-reorder-fields
to enable reordering of fields of plain C structs.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D35329

llvm-svn: 308678
2017-07-20 21:41:20 +00:00
Vitaly Buka 6d8fb107b2 Add end-to-end tests for overflows of byval arguments.
Summary:
Included is one test for passing structs by value and one test for passing C++
objects by value.

Submitted on behalf of Matt Morehouse.

Reviewers: eugenis, vitalybuka

Reviewed By: eugenis

Subscribers: srhines, kubamracek, llvm-commits

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

llvm-svn: 308677
2017-07-20 21:40:53 +00:00