Zachary Turner [Wed, 5 Oct 2016 16:54:09 +0000 (16:54 +0000)]
Add llvm::enumerate() range adapter.
This allows you to enumerate over a range using a range-based
for while the return type contains the index of the enumeration.
Differential revision: https://reviews.llvm.org/D25124
llvm-svn: 283337
Rafael Espindola [Wed, 5 Oct 2016 16:33:03 +0000 (16:33 +0000)]
Don't pass null to memcpy. Should fix the asan bots.
llvm-svn: 283336
Luke Drummond [Wed, 5 Oct 2016 16:27:48 +0000 (16:27 +0000)]
[RenderScript] reflow/reword some comments and normalize names
Pay more attention to comment alignement (Since _The Great Reformat_ (
a015ff50)
comments are no longer properly aligned) and variable naming conventions.
- Manually reflow and cleanup comments and array literals
- Be more economical with our naming conventions
- Be internally consistent with regard to local variable/member function
naming
llvm-svn: 283335
Simon Dardis [Wed, 5 Oct 2016 16:11:01 +0000 (16:11 +0000)]
Recommit: "[mips] Add rsqrt, recip for MIPS"
Add rsqrt.[ds], recip.[ds] for MIPS. Correct the microMIPS definitions for
architecture support and register usage.
Reviewers: vkalintiris, zoran.jovanoic
Differential Review: https://reviews.llvm.org/D24499
llvm-svn: 283334
Eric Liu [Wed, 5 Oct 2016 15:52:39 +0000 (15:52 +0000)]
[change-namespace] Fixed a bug in getShortestQualifiedNameInNamespace.
Reviewers: hokein
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25065
llvm-svn: 283333
Eric Liu [Wed, 5 Oct 2016 15:49:01 +0000 (15:49 +0000)]
Make DeletedLines local variables in checkEmptyNamespace.
Summary: Patch by Sam McCall!
Reviewers: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D25162
llvm-svn: 283332
Marshall Clow [Wed, 5 Oct 2016 15:47:13 +0000 (15:47 +0000)]
Add another append test for basic_string
llvm-svn: 283331
Eric Liu [Wed, 5 Oct 2016 15:42:19 +0000 (15:42 +0000)]
[clang-format] append newline after code when inserting new headers at the end of the code which does not end with newline.
Summary:
append newline after code when inserting new headers at the end of the
code which does not end with newline.
Reviewers: djasper
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D21026
llvm-svn: 283330
Hans Wennborg [Wed, 5 Oct 2016 15:39:27 +0000 (15:39 +0000)]
Revert r282920 "X86: Allow conditional tail calls in Win64 "leaf" functions (PR26302)"
This is suspected to cause a miscompile in Chromium. Reverting while
investigating.
llvm-svn: 283329
Rafael Espindola [Wed, 5 Oct 2016 15:35:18 +0000 (15:35 +0000)]
Remove redundant check. NFC.
llvm-svn: 283328
Simon Dardis [Wed, 5 Oct 2016 15:28:33 +0000 (15:28 +0000)]
Revert "[mips] Add rsqrt, recip for MIPS"
This reverts commit r282485 which contain two patches instead of
one.
llvm-svn: 283327
Douglas Katzman [Wed, 5 Oct 2016 15:23:35 +0000 (15:23 +0000)]
[X86] Don't randomly encode %rip where illegal
Differential Revision: https://reviews.llvm.org/D25112
llvm-svn: 283326
Marshall Clow [Wed, 5 Oct 2016 15:21:11 +0000 (15:21 +0000)]
Mark LWG issues 2221, 2556 and 2589 as complete
llvm-svn: 283325
Dimitar Vlahovski [Wed, 5 Oct 2016 15:00:29 +0000 (15:00 +0000)]
xfailing minidump tests again ... :(
llvm-svn: 283324
James Molloy [Wed, 5 Oct 2016 14:52:13 +0000 (14:52 +0000)]
[Thumb] Don't try and emit LDRH/LDRB from the constant pool
This is not a valid encoding - these instructions cannot do PC-relative addressing.
The underlying problem here is of whitelist in ARMISelDAGToDAG that unwraps ARMISD::Wrappers during addressing-mode selection. This didn't realise TargetConstantPool was actually possible, so didn't handle it.
llvm-svn: 283323
Douglas Katzman [Wed, 5 Oct 2016 14:46:14 +0000 (14:46 +0000)]
[X86] Fix some tests that didn't assert anything
llvm-svn: 283322
Dimitar Vlahovski [Wed, 5 Oct 2016 14:35:30 +0000 (14:35 +0000)]
Fixing new Minidump plugin tests
llvm-svn: 283321
Luke Drummond [Wed, 5 Oct 2016 14:34:52 +0000 (14:34 +0000)]
cleanup RSCoordinate handling and factor out coordinate parser
- This change updates the signature of
`RenderScriptRuntime::PlaceBreakpointOnKernel` to take a default
RSCoordinate pointer of nullptr. We use this as the predicate value for
the breakpoint coordinate rather than trying to fit a sentinel `-1` into
a signed version.
```
- void
- PlaceBreakpointOnKernel(Stream &strm, const char *name, const std::array<int, 3> coords, Error &error,
- lldb::TargetSP target);
```
```
+ bool
+ PlaceBreakpointOnKernel(lldb::TargetSP target, Stream &messages, const char *name,
+ const lldb_renderscript::RSCoordinate *coords = nullptr);
```
The above change makes the API for setting breakpoints on kernels
cleaner as it returns a failure value rather than modify a sentinel in
the caller. The optional arguments are now last and have a default
(falsey) value.
- RSCoordinate objects are now comparable with operator== and have
zero initializers which should make them easier to work on.
- Added a `FMT_COORD` macro for use in logging format strings which
should make format strings a little less verbose.
llvm-svn: 283320
Oren Ben Simhon [Wed, 5 Oct 2016 14:12:41 +0000 (14:12 +0000)]
Test commit permission
llvm-svn: 283319
Oren Ben Simhon [Wed, 5 Oct 2016 13:48:33 +0000 (13:48 +0000)]
Test commit permission
llvm-svn: 283318
Dylan McKay [Wed, 5 Oct 2016 13:38:29 +0000 (13:38 +0000)]
[AVR] Don't select 'MOVW' instructions when they are not supported
We have a subtarget feature which we were ignoring, which was causing us
to generate unsupported instructions for some older chips.
llvm-svn: 283317
Dylan McKay [Wed, 5 Oct 2016 13:27:30 +0000 (13:27 +0000)]
[AVR] Add AVRRegisterInfo::splitReg function
No tests are included just yet - this is used from the pseudo
instruction expander pass, which hasn't been pulled in-tree yet.
llvm-svn: 283316
Krzysztof Parzyszek [Wed, 5 Oct 2016 13:15:06 +0000 (13:15 +0000)]
Fix machine operand traversal in ScheduleDAGInstrs::fixupKills
llvm-svn: 283315
Michael Zuckerman [Wed, 5 Oct 2016 12:56:06 +0000 (12:56 +0000)]
[Clang][AVX512][BuiltIn]Adding missing intrinsics move_{sd|ss} to clang
Differential Revision: http://reviews.llvm.org/D21021
llvm-svn: 283314
Luke Drummond [Wed, 5 Oct 2016 12:40:49 +0000 (12:40 +0000)]
Delete unused global in ClangExpressionVariable.cpp
Differential Revision: https://reviews.llvm.org/D24793
llvm-svn: 283313
Dylan McKay [Wed, 5 Oct 2016 12:32:24 +0000 (12:32 +0000)]
[AVR] Update return type of dynamic alloca pass
It was recently changed from 'const char*' to StringRef
llvm-svn: 283312
Dylan McKay [Wed, 5 Oct 2016 11:48:56 +0000 (11:48 +0000)]
[AVR] Add the AVR frame lowering code
Summary: This allows AVR to lower frames into assembly code.
Reviewers: arsenm, kparzysz
Subscribers: japaric, wdng, beanz, mgorny
Differential Revision: https://reviews.llvm.org/D25032
llvm-svn: 283311
Dylan McKay [Wed, 5 Oct 2016 10:28:45 +0000 (10:28 +0000)]
[AVR] Split all of the AVR device definitions into a separate file
We have ~500 lines of subtarget feature definitions, they don't belong
in our main TableGen file.
llvm-svn: 283310
Dylan McKay [Wed, 5 Oct 2016 10:23:38 +0000 (10:23 +0000)]
[AVR] Enable the instruction printer in the target definition
llvm-svn: 283309
Dylan McKay [Wed, 5 Oct 2016 10:20:33 +0000 (10:20 +0000)]
[AVR] Add definitions for the ATTiny102 and ATtiny104 chips
llvm-svn: 283308
Eugene Leviant [Wed, 5 Oct 2016 10:10:45 +0000 (10:10 +0000)]
Do not join sections for relocatable object files
Differential revision: https://reviews.llvm.org/D25232
llvm-svn: 283307
Haojian Wu [Wed, 5 Oct 2016 10:04:13 +0000 (10:04 +0000)]
Overhaul clang-include-fixer.el
General overhaul to fix many coding bugs, simplify the code, and improve readability.
* Clarify documentation strings of user options.
* Say that clang-include-fixer-executable is a file to have auto completion.
* Allow user to select available options for clang-include-fixer-input-format. Turn it into a symbol as it's not a free-form string.
* Remove clang-include-fixer-query-mode. This option was apparently used to select between two different operation modes, which is not a typical use case for user options. Provide two separate commands instead.
* Add a face for the overlay highlighting so that users can customize it.
Move user commands to the front so that readers of the code aren't buried in internal functions.
* Make process calls asynchronous. This is possible here because clang-include-fixer doesn't change files in place. This means input is no longer blocked while clang-include-fixer is running.
* Factor out logic in helper functions to keep functions short.
* Add comments where appropriate.
* Provide an alternative buffer replacement strategy for the case that a single line was inserted (the normal case in the case of clang-include-fixer). This keeps point, markers, and other buffer information intact.
* Use let-alist and association lists instead of property lists to shorten the code.
* Instead of highlighting only the first occurrence of a symbol, highlight all occurrences and move point to the closest one.
* Detect qualified names at point.
* Use filepos-to-bufferpos if available.
* Formatting.
Patch by Philipp Stephani!
llvm-svn: 283306
Eugene Leviant [Wed, 5 Oct 2016 09:36:59 +0000 (09:36 +0000)]
[ELF] make KEEP command recognize file patterns
Differential revision: https://reviews.llvm.org/D25242
llvm-svn: 283305
Alex Lorenz [Wed, 5 Oct 2016 09:27:48 +0000 (09:27 +0000)]
[Sema] Packed member warning: Use the typedef name for anonymous structures
This commit improves the packed member warning by showing the name of the
anonymous structure/union when it was defined within a typedef declaration.
rdar://
28498901
Differential Revision: https://reviews.llvm.org/D25106
llvm-svn: 283304
Artem Dergachev [Wed, 5 Oct 2016 08:47:31 +0000 (08:47 +0000)]
[analyzer] Squash a compile error in r283301.
The constexpr string literal trick isn't supported in MSVC2013.
llvm-svn: 283303
Artem Dergachev [Wed, 5 Oct 2016 08:28:25 +0000 (08:28 +0000)]
[analyzer] Improve "Assuming..." diagnostic pieces for logical operators.
Logical short-circuit operators now act like other branch conditions.
If the symbolic value of the left-hand side is not known to be true or false
(based on the previous execution path), the "Assuming" event piece is added
in order to explain that the analyzer is adding a new assumption.
Additionally, when the assumption is made against the right-hand side of
the logical operator (i.e. when the operator itself acts as a condition
in another CFG terminator), the "Assuming..." piece is written out for the
right-hand side of the operator rather than for the whole operator.
This allows expression-specific diagnostic message text to be constructed.
Differential Revision: https://reviews.llvm.org/D25092
llvm-svn: 283302
Artem Dergachev [Wed, 5 Oct 2016 08:19:49 +0000 (08:19 +0000)]
[analyzer] Add "Assuming..." diagnostic pieces for unsupported conditions.
In the analyzer's path-sensitive reports, when a report goes through a branch
and the branch condition cannot be decided to be definitely true or false
(based on the previous execution path), an event piece is added that tells the
user that a new assumption is added upon the symbolic value of the branch
condition. For example, "Assuming 'a' is equal to 3".
The text of the assumption is hand-crafted in various manners depending on
the AST expression. If the AST expression is too complex and the text of
the assumption fails to be constructed, the event piece is omitted.
This causes loss of information and misunderstanding of the report.
Do not omit the event piece even if the expression is too complex;
add a piece with a generic text instead.
Differential Revision: https://reviews.llvm.org/D23300
llvm-svn: 283301
Simon Atanasyan [Wed, 5 Oct 2016 07:49:18 +0000 (07:49 +0000)]
[ELF] Do not merge sections in case of relocatable object generation
Do not merge sections if generating a relocatable object. It makes
the code simpler because we do not need to update relocations addends
to reflect changes introduced by merging. Instead of that we write
such "merge" sections into separate OutputSections and keep SHF_MERGE
/ SHF_STRINGS flags and sh_entsize value to be able to perform merging
later during a final linking.
Differential Revision: http://reviews.llvm.org/D25066
llvm-svn: 283300
Diana Picus [Wed, 5 Oct 2016 07:13:42 +0000 (07:13 +0000)]
[sanitizers] Update sanitizers test to better match glibc internals
Reapply 282061.
One of the tests relying on sem_t's layout gets the wrong value for versions of
glibc newer than 2.21 on platforms that don't have 64-bit atomics (e.g. ARM).
This commit fixes the test to work with:
* versions of glibc >= 2.21 on platforms with 64-bit atomics: unchanged
* versions of glibc >= 2.21 on platforms without 64-bit atomics: the semaphore
value is shifted by SEM_VALUE_SHIFT (which is set to 1 in glibc's internal
headers)
* versions of glibc < 2.21: unchanged
The logic is complicated a bit by the fact that the sanitizers always pick the
oldest version of the symbol available in glibc, which creates discrepancies
between old platforms which contain several versions od the sem_init symbol, and
newer platforms which contain only one.
See the glibc 2.23 sources:
* sysdeps/nptl/internaltypes.h (struct new_sem for glibc >= 2.21 and
struct old_sem for glibc < 2.21)
* nptl/sem_getvalue.c
This was uncovered on one of the new buildbots that we are trying to move to
production.
Differential Revision: https://reviews.llvm.org/D24766
llvm-svn: 283299
Mehdi Amini [Wed, 5 Oct 2016 05:59:29 +0000 (05:59 +0000)]
Re-commit "Use StringRef in Support/Darf APIs (NFC)"
This reverts commit r283285 and re-commit r283275 with
a fix for format("%s", Str); where Str is a StringRef.
llvm-svn: 283298
Dylan McKay [Wed, 5 Oct 2016 05:30:19 +0000 (05:30 +0000)]
[AVR] Add the machine code backend
Summary:
This adds the AVR machine code backend (`AVRAsmBackend.cpp`). This will
allow us to generate machine code from assembled AVR instructions.
Reviewers: arsenm, kparzysz
Subscribers: modocache, japaric, wdng, beanz, mgorny
Differential Revision: https://reviews.llvm.org/D25029
llvm-svn: 283297
Dean Michael Berris [Wed, 5 Oct 2016 05:20:08 +0000 (05:20 +0000)]
[Support][CommandLine] Add cl::getRegisteredSubcommands()
This should allow users of the library to get a range to iterate through
all the subcommands that are registered to the global parser. This
allows users to define subcommands in libraries that self-register to
have dispatch done at a different stage (like main). It allows for
writing code like the following:
for (auto *S : cl::getRegisteredSubcommands()) {
if (*S) {
// Dispatch on S->getName().
}
}
This change also contains tests that show this usage pattern.
Reviewers: zturner, dblaikie, echristo
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D24489
llvm-svn: 283296
Jason Molenda [Wed, 5 Oct 2016 02:29:13 +0000 (02:29 +0000)]
Change Platform::GetRemoteSharedModule so if it's given a ModuleSpec
which specifies a file path and UUID but not an architecture, open
the file at that path and try every one of the architectures in the
file to see if there is a UUID match. Currently we'll pick the
first slice of a multi-architecture file and return that as the
match, and when the UUID doesn't match because it's the wrong
architecture, we'll end up ignoring the file.
<rdar://problem/
28487804>
llvm-svn: 283295
Mehdi Amini [Wed, 5 Oct 2016 01:41:11 +0000 (01:41 +0000)]
Blind attempt to fix windows build after r283290 - Use StringRef in StringSaver API (NFC)
llvm-svn: 283294
Mehdi Amini [Wed, 5 Oct 2016 01:41:06 +0000 (01:41 +0000)]
Use StringRef in ARMConstantPool APIs (NFC)
llvm-svn: 283293
Kyle Butt [Wed, 5 Oct 2016 01:39:29 +0000 (01:39 +0000)]
Revert "Codegen: Tail-duplicate during placement."
This reverts commit
062ace9764953e9769142c1099281a345f9b6bdc.
Issue with loop info and block removal revealed by polly.
I have a fix for this issue already in another patch, I'll re-roll this
together with that fix, and a test case.
llvm-svn: 283292
Mehdi Amini [Wed, 5 Oct 2016 01:37:29 +0000 (01:37 +0000)]
Use StringRef in FastISel API (NFC)
llvm-svn: 283291
Mehdi Amini [Wed, 5 Oct 2016 01:32:41 +0000 (01:32 +0000)]
Use StringRef in StringSaver API (NFC)
llvm-svn: 283290
Jim Ingham [Wed, 5 Oct 2016 01:19:15 +0000 (01:19 +0000)]
The collision of class C and libsystem_c.dylib:C is a failure
worth preserving, but not essential to the purpose of this test
so I broke it into a separate test.
llvm-svn: 283289
Mehdi Amini [Wed, 5 Oct 2016 01:15:04 +0000 (01:15 +0000)]
Use StringRef in ARCRuntimeEntryPoints APIs (NFC)
llvm-svn: 283288
Jim Ingham [Wed, 5 Oct 2016 01:09:43 +0000 (01:09 +0000)]
This test is failing because there's a global symbol "C" in libsystem_c.dylib,
and that is defeating the lookup of the "struct C" here. Adding the bug for that.
llvm-svn: 283287
Kostya Serebryany [Wed, 5 Oct 2016 01:09:40 +0000 (01:09 +0000)]
[libFuzzer] add ShrinkValueProfileTest, move code around, NFC
llvm-svn: 283286
Mehdi Amini [Wed, 5 Oct 2016 01:04:02 +0000 (01:04 +0000)]
Revert "Re-commit "Use StringRef in Support/Darf APIs (NFC)""
One test seems randomly broken: DebugInfo/X86/gnu-public-names.ll
llvm-svn: 283285
Mehdi Amini [Wed, 5 Oct 2016 01:02:34 +0000 (01:02 +0000)]
Use StringRef in MCSectionMachO (NFC)
llvm-svn: 283284
Mehdi Amini [Wed, 5 Oct 2016 01:02:22 +0000 (01:02 +0000)]
Use StringRef in DarwinAsmParser (NFC)
llvm-svn: 283283
Michael Zolotukhin [Wed, 5 Oct 2016 00:44:52 +0000 (00:44 +0000)]
[LoopDistribute] Fix a typo in the pass name.
llvm-svn: 283282
Mehdi Amini [Wed, 5 Oct 2016 00:37:18 +0000 (00:37 +0000)]
Re-commit "Use StringRef in Support/Darf APIs (NFC)"
This reverts commit r283278 and re-commit r283275 with
the update to fix the build on the LLDB side.
llvm-svn: 283281
Justin Lebar [Wed, 5 Oct 2016 00:27:38 +0000 (00:27 +0000)]
[CUDA] Add missing ':' to noexcept.cu test.
llvm-svn: 283280
Kostya Serebryany [Wed, 5 Oct 2016 00:25:17 +0000 (00:25 +0000)]
[libFuzzer] clear the corpus elements if they are evicted (i.e. smaller elements with proper coverage are found). Make sure we never try to mutate empty element. Print the corpus size in bytes in the status lines
llvm-svn: 283279
Mehdi Amini [Wed, 5 Oct 2016 00:21:14 +0000 (00:21 +0000)]
Revert "Use StringRef in Support/Darf APIs (NFC)"
This reverts commit r283275, it broke LLDB Android debug server.
llvm-svn: 283278
Mehdi Amini [Wed, 5 Oct 2016 00:15:18 +0000 (00:15 +0000)]
Use StringRef instead of raw pointers in ARMBuildAttrs (NFC)
llvm-svn: 283277
Jim Ingham [Wed, 5 Oct 2016 00:07:01 +0000 (00:07 +0000)]
Add the new minidump files to the Xcode project.
llvm-svn: 283276
Mehdi Amini [Tue, 4 Oct 2016 23:55:40 +0000 (23:55 +0000)]
Use StringRef in Support/Darf APIs (NFC)
llvm-svn: 283275
Kyle Butt [Tue, 4 Oct 2016 23:54:18 +0000 (23:54 +0000)]
Codegen: Tail-duplicate during placement.
The tail duplication pass uses an assumed layout when making duplication
decisions. This is fine, but passes up duplication opportunities that
may arise when blocks are outlined. Because we want the updated CFG to
affect subsequent placement decisions, this change must occur during
placement.
In order to achieve this goal, TailDuplicationPass is split into a
utility class, TailDuplicator, and the pass itself. The pass delegates
nearly everything to the TailDuplicator object, except for looping over
the blocks in a function. This allows the same code to be used for tail
duplication in both places.
This change, in concert with outlining optional branches, allows
triangle shaped code to perform much better, esepecially when the
taken/untaken branches are correlated, as it creates a second spine when
the tests are small enough.
Issue from previous rollback fixed, and a new test was added for that
case as well.
Differential revision: https://reviews.llvm.org/D18226
llvm-svn: 283274
Mehdi Amini [Tue, 4 Oct 2016 23:47:33 +0000 (23:47 +0000)]
Use StringRef in TableGen (NFC)
llvm-svn: 283273
Justin Lebar [Tue, 4 Oct 2016 23:41:49 +0000 (23:41 +0000)]
[CUDA] Mark device functions as nounwind.
Summary:
This prevents clang from emitting 'invoke's and catch statements.
Things previously mostly worked thanks to TryToMarkNoThrow() in
CodeGenFunction. But this is not a proper IPO, and it doesn't properly
handle cases like mutual recursion.
Fixes bug 30593.
Reviewers: tra
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25166
llvm-svn: 283272
Justin Lebar [Tue, 4 Oct 2016 23:41:45 +0000 (23:41 +0000)]
[CUDA] Destroy deferred diagnostics before destroying the ASTContext's PartialDiagnostic allocator.
Summary:
This will let us (in a separate patch) allocate deferred diagnostics in
the ASTContext's PartialDiagnostic arena.
Reviewers: rnk
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25260
llvm-svn: 283271
Kostya Serebryany [Tue, 4 Oct 2016 23:39:58 +0000 (23:39 +0000)]
[asan] When protect_shadow_gap=0, set up the shadow for the shadow gap. This is needed to support NVIDIA CUDA drivers. Unfortunately, I don't know how to test it properly with CUDA on a public build bot, so adding a test that emulates the CUDA behavior.
llvm-svn: 283270
Manuel Jacob [Tue, 4 Oct 2016 23:32:42 +0000 (23:32 +0000)]
[C API] Add LLVMConstExactUDiv and LLVMBuildExactUDiv functions.
Summary:
These are analog to the existing LLVMConstExactSDiv and LLVMBuildExactSDiv
functions.
Reviewers: deadalnix, majnemer
Subscribers: majnemer, llvm-commits
Differential Revision: https://reviews.llvm.org/D25259
llvm-svn: 283269
Mehdi Amini [Tue, 4 Oct 2016 23:31:39 +0000 (23:31 +0000)]
Use StringRef in TableGen emitted API for attribute (NFC)
llvm-svn: 283268
Rafael Espindola [Tue, 4 Oct 2016 22:43:38 +0000 (22:43 +0000)]
Update for llvm change.
llvm-svn: 283267
Rafael Espindola [Tue, 4 Oct 2016 22:43:25 +0000 (22:43 +0000)]
Misc improvements to StringTableBuilder.
This patch adds write methods to StringTableBuilder so that it is
easier to change the underlying implementation.
Using the write methods, avoid creating a temporary buffer when using
mmaped output.
It also uses a more compact key in the DenseMap. Overall this produces
a slightly faster lld:
firefox
master 6.
853419709
patch 6.
841968912 1.00167361138x faster
chromium
master 4.
297280174
patch 4.
298712163 1.00033323147x slower
chromium fast
master 1.
802335952
patch 1.
806872459 1.00251701521x slower
the gold plugin
master 0.3247149
patch 0.
321971644 1.00852017888x faster
clang
master 0.
551279945
patch 0.
543733194 1.01387951128x faster
llvm-as
master 0.
032743458
patch 0.
032143478 1.01866568391x faster
the gold plugin fsds
master 0.
350814247
patch 0.
348571741 1.00643341309x faster
clang fsds
master 0.6281672
patch 0.
621130222 1.01132931187x faster
llvm-as fsds
master 0.
030168899
patch 0.
029797155 1.01247582194x faster
scylla
master 3.
104222518
patch 3.
059590248 1.01458766252x faster
llvm-svn: 283266
Alina Sbirlea [Tue, 4 Oct 2016 22:39:53 +0000 (22:39 +0000)]
[cpu-detection] Copy simplified version of get_cpuid_max to remove dependency to clang's implementation
Summary:
Attempting to fix PR30384.
Take the same approach as in compiler_rt and add a simplified version of __get_cpuid_max.
Including cpuid.h is no longer needed.
Reviewers: echristo, joerg
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D24597
llvm-svn: 283265
Albert Gutowski [Tue, 4 Oct 2016 22:29:49 +0000 (22:29 +0000)]
Separate builtins for x84-64 and i386; implement __mulh and __umulh
Summary: We need x86-64-specific builtins if we want to implement some of the MS intrinsics - winnt.h contains definitions of some functions for i386, but not for x86-64 (for example _InterlockedOr64), which means that we cannot treat them as builtins for both i386 and x86-64, because then we have definitions of builtin functions in winnt.h on i386.
Reviewers: thakis, majnemer, hans, rnk
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D24598
llvm-svn: 283264
Dimitar Vlahovski [Tue, 4 Oct 2016 21:55:47 +0000 (21:55 +0000)]
xfailing tests for Minidump plugin
the tests are failing on the buildbot because there is an extra frame
(maybe) on the call stack.
Will investigate tomorrow.
llvm-svn: 283263
Tamas Berghammer [Tue, 4 Oct 2016 21:32:46 +0000 (21:32 +0000)]
Fix the decorator of TestBreakpointCaseSensitivity
llvm-svn: 283262
Zachary Turner [Tue, 4 Oct 2016 21:27:09 +0000 (21:27 +0000)]
Make building the clang-tidy VS extension less spammy.
The package that strong name signs the 3rd party references
spams a ton of output to the log, making the build really ugly.
Make this quiet.
llvm-svn: 283261
Eric Fiselier [Tue, 4 Oct 2016 21:25:51 +0000 (21:25 +0000)]
[libcxx] [test] Guard __has_include usage with a macro
Summary: There's a macro scheme already being used for __has_feature etc. Use it for __has_include too, which makes MSVC happy (it doesn't support __has_include yet, and unguarded use explodes horribly).
Reviewers: mclow.lists, EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25251
llvm-svn: 283260
Dimitar Vlahovski [Tue, 4 Oct 2016 21:02:13 +0000 (21:02 +0000)]
Adding a new Minidump post-mortem debugging plugin
Summary:
This plugin resembles the already existing Windows-only Minidump plugin.
The WinMinidumpPlugin uses the Windows API for parsing Minidumps
while this plugin is cross-platform because it includes a Minidump
parser (which is already commited)
It is able to produce a backtrace, to read the general puprose regiters,
inspect local variables, show image list, do memory reads, etc.
For now the only arch that this supports is x86 64 bit
This is because I have only written a register context for that arch.
Others will come in next CLs.
I copied the WinMinidump tests and adapted them a little bit for them to
work with the new plugin (and they pass)
I will add more tests, aiming for better code coverage.
There is still functionality to be added, see TODOs in code.
Reviewers: labath, zturner
Subscribers: beanz, mgorny, amccarth, lldb-commits, modocache
Differential Revision: https://reviews.llvm.org/D25196
llvm-svn: 283259
Hans Wennborg [Tue, 4 Oct 2016 21:01:04 +0000 (21:01 +0000)]
clang-cl: Make /Fo apply also when using -flto
llvm-svn: 283258
Hans Wennborg [Tue, 4 Oct 2016 21:01:02 +0000 (21:01 +0000)]
clang-cl: Use the .obj file extension also in LTO mode
llvm-svn: 283257
Hans Wennborg [Tue, 4 Oct 2016 21:01:00 +0000 (21:01 +0000)]
clang-cl: expose the -fuse-ld option
llvm-svn: 283256
Hans Wennborg [Tue, 4 Oct 2016 21:00:57 +0000 (21:00 +0000)]
clang-cl: Expose the -flto option
We could hook up /GL as an alias for -flto, but that might be
confusing, as clang-cl in that mode would not be drop-in compatible
with cl.exe /GL, as it requires the linker to be lld.
Exposing -flto seems like a less confusing way to expose this
functionality.
llvm-svn: 283255
David L Kreitzer [Tue, 4 Oct 2016 20:57:19 +0000 (20:57 +0000)]
Revert r283248. It caused failures in the hexagon buildbots.
llvm-svn: 283254
Anna Zaks [Tue, 4 Oct 2016 20:49:31 +0000 (20:49 +0000)]
[analyzer] Add PostStmt callback for ArraySubscriptExpr
A patch by Jan Smets!
Differential Revision: https://reviews.llvm.org/D25009
llvm-svn: 283253
Sanjay Patel [Tue, 4 Oct 2016 20:46:43 +0000 (20:46 +0000)]
[Target] move reciprocal estimate settings from TargetOptions to TargetLowering
The motivation for the change is that we can't have pseudo-global settings for
codegen living in TargetOptions because that doesn't work with LTO.
Ideally, these reciprocal attributes will be moved to the instruction-level via
FMF, metadata, or something else. But making them function attributes is at least
an improvement over the current state.
The ingredients of this patch are:
Remove the reciprocal estimate command-line debug option.
Add TargetRecip to TargetLowering.
Remove TargetRecip from TargetOptions.
Clean up the TargetRecip implementation to work with this new scheme.
Set the default reciprocal settings in TargetLoweringBase (everything is off).
Update the PowerPC defaults, users, and tests.
Update the x86 defaults, users, and tests.
Note that if this patch needs to be reverted, the related clang patch checked in
at r283251 should be reverted too.
Differential Revision: https://reviews.llvm.org/D24816
llvm-svn: 283252
Sanjay Patel [Tue, 4 Oct 2016 20:44:05 +0000 (20:44 +0000)]
[clang] make reciprocal estimate codegen a function attribute
The motivation for the change is that we can't have pseudo-global settings
for codegen living in TargetOptions because that doesn't work with LTO.
Ideally, these reciprocal attributes will be moved to the instruction-level
via FMF, metadata, or something else. But making them function attributes is
at least an improvement over the current state.
I'm committing this patch ahead of the related LLVM patch to avoid bot failures,
but if that patch needs to be reverted, then this should be reverted too.
Differential Revision: https://reviews.llvm.org/D24815
llvm-svn: 283251
Kevin Enderby [Tue, 4 Oct 2016 20:37:43 +0000 (20:37 +0000)]
Next set of additional error checks for invalid Mach-O files for the
load commands that uses the MachO::encryption_info_command and
MachO::encryption_info_command types but not used in llvm libObject
code but used in llvm tool code.
This includes just LC_ENCRYPTION_INFO and
LC_ENCRYPTION_INFO_64 load commands.
llvm-svn: 283250
Vedant Kumar [Tue, 4 Oct 2016 20:36:04 +0000 (20:36 +0000)]
[ubsan] Disable bounds-check for flexible array ivars
This eliminates a class of false positives for -fsanitize=array-bounds
on instrumented ObjC projects.
Differential Revision: https://reviews.llvm.org/D22227
llvm-svn: 283249
David L Kreitzer [Tue, 4 Oct 2016 20:31:32 +0000 (20:31 +0000)]
[safestack] Requires a valid TargetMachine to be passed to the SafeStack pass.
Patch by Michael LeMay
Differential revision: http://reviews.llvm.org/D24896
llvm-svn: 283248
Michal Gorny [Tue, 4 Oct 2016 20:25:37 +0000 (20:25 +0000)]
[cmake] Make LIT_COMMAND configurable and improve fallback support
Make LIT_COMMAND configurable, use source tree only when actually
available and extend the default search to other common executable names
'lit.py' and 'lit', in order to increase uniformity between all LLVM
projects and support using installed lit.
Changing the conditional used to determine whether in-tree or external
lit is being used covers the case when LLVM_MAIN_SRC_DIR is defined but
does not exist (anymore). In this case, the functions falls back to
looking for installed lit rather than attempting to use a non-existing
path. The same conditional is used in clang already.
Making LIT_COMMAND a cache variable in case the source tree variant is
used serves two purposes. Firstly, it increases uniformity between
the two branches since find_program() implicitly makes LIT_COMMAND
a cache variable. Secondly, it allows overriding the lit executable used
to run the tests when the LLVM source tree is provided. Gentoo is
planning to use this to use installed (and byte-compiled) lit instead of
re-compiling it in every LLVM project.
Extending default search is meant to increase uniformity between
different LLVM projects. The 'lit.py' name is already used by a few of
them, and 'lit' is the name used by utils/lit/setup.py when installing.
Differential Revision: https://reviews.llvm.org/D25076
llvm-svn: 283247
Daniel Jasper [Tue, 4 Oct 2016 20:18:25 +0000 (20:18 +0000)]
clang-format: Fix bad multi-variable for-loop formatting.
Before:
for (int*p, *q; p != q; p = p->next) {
After:
for (int *p, *q; p != q; p = p->next) {
llvm-svn: 283246
Tobias Grosser [Tue, 4 Oct 2016 19:48:40 +0000 (19:48 +0000)]
Build and run isl_test as part of check-polly
Running isl tests is important to gain confidence that the isl build we created
works as expected. Besides the actual isl tests, there are also isl AST
generation tests shipped with isl. This change only adds support for the isl
unit tests. AST generation test support is left for a later commit.
There is a choice to run tests directly through the build system or in the
context of lit. We choose to run tests as part of lit to as this allows us to
easily set environment variables, print output only on error and generally run
the tests directly from the lit command.
Reviewers: brad.king, Meinersbur
Subscribers: modocache, brad.king, pollydev, beanz, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D25155
llvm-svn: 283245
Zachary Turner [Tue, 4 Oct 2016 19:33:13 +0000 (19:33 +0000)]
[Support] Add case-insensitive versions of StringSwitch members.
This adds support for CaseLower, CasesLower, StartsWithLower, and
EndsWithLower.
Differential revision: https://reviews.llvm.org/D24686
llvm-svn: 283244
Matthias Braun [Tue, 4 Oct 2016 19:28:21 +0000 (19:28 +0000)]
AArch64: Macrofusion: Split features, add missing combinations.
AArch64InstrInfo::shouldScheduleAdjacent() determines whether two
instruction can benefit from macroop fusion on apple CPUs. The list
turned out to be incomplete:
- the "rr" variants of the instructions were missing
- even the "rs" variants can have shift value == 0 and behave like the
"rr" variants
This also splits the MacropFusion target feature into
ArithmeticBccFusion and ArithmeticCbzFusion.
Differential Revision: https://reviews.llvm.org/D25142
llvm-svn: 283243
Mike Aizatsky [Tue, 4 Oct 2016 19:19:16 +0000 (19:19 +0000)]
[sancov] documentation update after r283241
llvm-svn: 283242
Mike Aizatsky [Tue, 4 Oct 2016 19:18:23 +0000 (19:18 +0000)]
[sancov] renamed symcov-report-server to coverage-report-server
llvm-svn: 283241
Anna Zaks [Tue, 4 Oct 2016 19:02:53 +0000 (19:02 +0000)]
[asan] Switch to using dynamic shadow offset on iOS
The VM layout is not stable between iOS version releases, so switch to dynamic shadow offset.
Differential Revision: https://reviews.llvm.org/D25218
llvm-svn: 283240
Anna Zaks [Tue, 4 Oct 2016 19:02:29 +0000 (19:02 +0000)]
[asan] LLVM: Switch to using dynamic shadow offset on iOS
The VM layout is not stable between iOS version releases, so switch to dynamic shadow offset.
This is the LLVM counterpart of https://reviews.llvm.org/D25218
Differential Revision: https://reviews.llvm.org/D25219
llvm-svn: 283239
Francis Ricci [Tue, 4 Oct 2016 18:48:00 +0000 (18:48 +0000)]
Improvements to testing blacklist
Summary:
This patch is necessary because individual test cases are not required
to have unique names. Therefore, test cases must now
be specified explicitly in the form <TestCase>.<TestMethod>.
Because it works by regex matching, passing just <TestCase> will
still disable an entire file.
This also allows for multiple exclusion files to be specified.
Reviewers: zturner, labath, jingham, tfiala
Subscribers: lldb-commits, sas
Differential Revision: https://reviews.llvm.org/D24988
llvm-svn: 283238