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
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
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/D35262https://reviews.llvm.org/D35049
llvm-svn: 308729
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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