Jingyue Wu [Wed, 4 May 2016 17:34:57 +0000 (17:34 +0000)]
[NVPTX:doc] Update code examples to conform to the latest IR.
llvm-svn: 268522
Balaram Makam [Wed, 4 May 2016 17:34:20 +0000 (17:34 +0000)]
[InstCombine] Canonicalize icmp instructions based on dominating conditions.
Summary:
This patch canonicalizes conditions based on the constant range information
of the dominating branch condition.
For example:
%cmp = icmp slt i64 %a, 0
br i1 %cmp, label %land.lhs.true, label %lor.rhs
lor.rhs:
%cmp2 = icmp sgt i64 %a, 0
Would now be canonicalized into:
%cmp = icmp slt i64 %a, 0
br i1 %cmp, label %land.lhs.true, label %lor.rhs
lor.rhs:
%cmp2 = icmp ne i64 %a, 0
Reviewers: mcrosier, gberry, t.p.northover, llvm-commits, reames, hfinkel, sanjoy, majnemer
Subscribers: MatzeB, majnemer, mcrosier
Differential Revision: http://reviews.llvm.org/D18841
llvm-svn: 268521
Bryan Chan [Wed, 4 May 2016 17:24:31 +0000 (17:24 +0000)]
Fix a SIGSEGV caused by dereferencing a pointer without a null check
llvm-svn: 268520
Leny Kholodov [Wed, 4 May 2016 16:56:51 +0000 (16:56 +0000)]
[Support] Creation of minidump after compiler crash on Windows
In the current implementation compiler only prints stack trace
to console after crash. This patch adds saving of minidump
files which contain a useful subset of the information for
further debugging.
Differential Revision: http://reviews.llvm.org/D18216
llvm-svn: 268519
Reid Kleckner [Wed, 4 May 2016 16:09:04 +0000 (16:09 +0000)]
Reland "Use ScopedPrinter in llvm-pdbdump"
This reverts r268508 and reinstates r268506 with an additional cast from
TypeLeafKind to unsigned to allow conversion to HexNumber.
llvm-svn: 268517
Nemanja Ivanovic [Wed, 4 May 2016 16:04:02 +0000 (16:04 +0000)]
[PowerPC] Generate VSX version of splat word
This patch corresponds to review:
http://reviews.llvm.org/D18592
It allows the PPC back end to generate the xxspltw instruction where we
previously only emitted vspltw.
llvm-svn: 268516
Rafael Espindola [Wed, 4 May 2016 15:51:23 +0000 (15:51 +0000)]
Delete getTlsGotRel.
It was an old hack to avoid duplicating expression computation, but that
is not needed with getExprRel.
llvm-svn: 268515
Simon Pilgrim [Wed, 4 May 2016 15:45:48 +0000 (15:45 +0000)]
[X86][SSE] Regenerate vector bswap tests
llvm-svn: 268514
Chad Rosier [Wed, 4 May 2016 15:42:29 +0000 (15:42 +0000)]
Typo. NFC.
llvm-svn: 268513
Hans Wennborg [Wed, 4 May 2016 15:40:57 +0000 (15:40 +0000)]
[SimplifyCFG] isSafeToSpeculateStore now ignores debug info
This patch fixes PR27615.
@llvm.dbg.value instructions no longer count towards the maximum number of
instructions to look back at in the instruction list when searching for a
store instruction. This should make the output consistent between debug and
non-debug build.
Patch by Henric Karlsson <henric.karlsson@ericsson.com>!
Differential Revision: http://reviews.llvm.org/D19912
llvm-svn: 268512
Igor Kudrin [Wed, 4 May 2016 15:38:26 +0000 (15:38 +0000)]
[Coverage] Fix an issue where a coverage region might not be created for a macro containing a loop statement.
The issue happened when a macro contained a full for or
while statement, which body ended at the end of the macro.
Differential Revision: http://reviews.llvm.org/D19725
llvm-svn: 268511
Marshall Clow [Wed, 4 May 2016 15:35:50 +0000 (15:35 +0000)]
Fixed some spelling errors in assert messages. No functional change. Thanks to giffunip@yahoo.com for the report.
llvm-svn: 268510
Marianne Mailhot-Sarrasin [Wed, 4 May 2016 15:26:28 +0000 (15:26 +0000)]
Do not disable completely loop unroll when optimizing for size.
Let the loop unroll pass handle /Os. It already checks that option and adjust its thresholds accordingly. Also, will allow the #pragma unroll to have an effect in /Os.
Differential Revision: http://reviews.llvm.org/D19827
llvm-svn: 268509
Chad Rosier [Wed, 4 May 2016 15:25:06 +0000 (15:25 +0000)]
Revert "Use ScopedPrinter in llvm-pdbdump"
This reverts commit r268506 due to build breakage.
llvm-svn: 268508
Chad Rosier [Wed, 4 May 2016 15:19:02 +0000 (15:19 +0000)]
Use a uniform name for the load combine pass. NFC.
llvm-svn: 268507
Zachary Turner [Wed, 4 May 2016 15:05:12 +0000 (15:05 +0000)]
Use ScopedPrinter in llvm-pdbdump
When printing raw PDB file fields, streams, and records, use the
ScopedPrinter class so we have consistency with llvm-readobj's output
format.
For the most part this is pretty mechanical, but I had to fix up the test
file to conform to the new YAMLesque output format. i added a few
additional helper functions to the ScopedPrinter such as one to print a
dotted version, etc.
Differential Revision: http://reviews.llvm.org/D19897
Reviewed By: rnk
llvm-svn: 268506
George Rimar [Wed, 4 May 2016 15:04:08 +0000 (15:04 +0000)]
Removed another dead code. NFC.
llvm-svn: 268505
Simon Pilgrim [Wed, 4 May 2016 15:01:13 +0000 (15:01 +0000)]
[SelectionDAG] BITREVERSE vector legalization of bit operations
Vector bit operations are typically promoted instead of having custom lowering. This patch changes the isOperationLegalOrCustom tests for vector AND/OR operations to use isOperationLegalOrPromote instead, allowing the SSE implementations to stay on the simd unit.
Differential Revision: http://reviews.llvm.org/D19805
llvm-svn: 268504
Jan Vesely [Wed, 4 May 2016 14:55:45 +0000 (14:55 +0000)]
AMDGPU/R600: Minor cleanup in InstrInfo
Use std::make_pair instead of constructor
Use C++11 loop
Reuse helper var
Reviewers: tstellardAMD
Subsribers: arsenm
Differential Revision: http://reviews.llvm.org/D19787
llvm-svn: 268503
Igor Laevsky [Wed, 4 May 2016 14:55:36 +0000 (14:55 +0000)]
[RS4GC] Use SetVector/MapVector instead of DenseSet/DenseMap to guarantee stable ordering
Goal of this change is to guarantee stable ordering of the statepoint arguments and other
newly inserted values such as gc.relocates. Previously we had explicit sorting in a couple
of places. However for unnamed values ordering was partial and overall we didn't have any
strong invariant regarding it. This change switches all data structures to use SetVector's
and MapVector's which provide possibility for deterministic iteration over them.
Explicit sorting is now redundant and was removed.
Differential Revision: http://reviews.llvm.org/D19669
llvm-svn: 268502
Rafael Espindola [Wed, 4 May 2016 14:44:22 +0000 (14:44 +0000)]
Simplify handling of hint relocations.
llvm-svn: 268501
Michael Kruse [Wed, 4 May 2016 14:41:36 +0000 (14:41 +0000)]
Update to ISL 0.17.
This release includes sevaral improvments compared to the previous
version isl-0.16.1-145-g243bf7c (from the ISL 0.17 announcement):
- optionally combine SCCs incrementally in scheduler
- optionally maximize coincidence in scheduler
- optionally avoid loop coalescing in scheduler
- minor AST generator improvements
- improve support for expansions in schedule trees
llvm-svn: 268500
Rafael Espindola [Wed, 4 May 2016 14:38:55 +0000 (14:38 +0000)]
Sort entries. NFC.
llvm-svn: 268499
Elena Demikhovsky [Wed, 4 May 2016 14:31:18 +0000 (14:31 +0000)]
The test files are auto-generated by update_llc_test_checks.py utility.
No functional changes.
llvm-svn: 268498
George Rimar [Wed, 4 May 2016 13:44:49 +0000 (13:44 +0000)]
Removed dead code. NFC.
llvm-svn: 268497
Daniel Sanders [Wed, 4 May 2016 13:21:06 +0000 (13:21 +0000)]
[mips][ias] Only round section sizes when explicitly requested.
As requested by Rafael Espindola in his post-commit comments on r268036. This
makes the previous behaviour the default while still allowing verification of
IAS.
llvm-svn: 268496
Rafael Espindola [Wed, 4 May 2016 12:47:56 +0000 (12:47 +0000)]
Print the cpio trailer after every member.
This is both simpler and safer. If we crash at any point, there is a
valid cpio file to reproduce the crash.
Thanks to Rui for the suggestion.
llvm-svn: 268495
Gabor Horvath [Wed, 4 May 2016 12:17:55 +0000 (12:17 +0000)]
[clang-tidy] Remove STL dependency from a test.
llvm-svn: 268494
Chris Dewhurst [Wed, 4 May 2016 12:11:05 +0000 (12:11 +0000)]
[Sparc] Allow taking of function address into a register.
Modification of previously existing code (variable rename only), with unit test added.
Differential Revision: http://reviews.llvm.org/D19368
llvm-svn: 268493
Gabor Horvath [Wed, 4 May 2016 12:02:22 +0000 (12:02 +0000)]
[clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature
Summary: Finds return statements in assign operator bodies where the return value is different from '*this'. Only assignment operators with correct return value Class& are checked.
Reviewers: aaron.ballman, alexfh, sbenza
Subscribers: o.gyorgy, baloghadamsoftware, LegalizeAdulthood, aaron.ballman, Eugene.Zelenko, xazax.hun, cfe-commits
Differential Revision: http://reviews.llvm.org/D18265
llvm-svn: 268492
Zlatko Buljan [Wed, 4 May 2016 12:02:12 +0000 (12:02 +0000)]
[mips][microMIPS] Add CodeGen support for microMIPSr6 ROTR and ROTRV and add tests for LL, SC, SYSCALL, ROTR, ROTRV, LWM32, SWM32 and MOVEP instructions
Differential Revision: http://reviews.llvm.org/D19857
llvm-svn: 268491
Gabor Horvath [Wed, 4 May 2016 11:59:39 +0000 (11:59 +0000)]
[ASTMatchers] New matcher forFunction
Summary: Matcher proposed in the review of checker misc-assign-operator (name pending). Its goal is to find the direct enclosing function declaration of a statement and run the inner matcher on it. Two version is attached in this patch (thus it will not compile), to be decided which approach to take. The second one always chooses one single parent while the first one does a depth-first search upwards (thus a height-first search) and returns the first positive match of the inner matcher (thus it always returns zero or one matches, not more). Further questions: is it enough to implement it in-place, or ASTMatchersInternals or maybe ASTMatchFinder should be involved?
Reviewers: sbenza
Subscribers: aaron.ballman, klimek, o.gyorgy, xazax.hun, cfe-commits
Differential Revision: http://reviews.llvm.org/D19357
llvm-svn: 268490
Andrey Turetskiy [Wed, 4 May 2016 11:28:22 +0000 (11:28 +0000)]
[X86] Add -m[no-]x87 and -m[no-]80387 options to control FeatureX87.
Add -m[no-]x87 and -m[no-]80387 options to control FeatureX87.
-m[no-]80387 options is added for compatibility with GCC.
Differential Revision: http://reviews.llvm.org/D19658
llvm-svn: 268489
Andrey Turetskiy [Wed, 4 May 2016 11:19:41 +0000 (11:19 +0000)]
Add missing -mno-cx16 driver option.
Differential Revision: http://reviews.llvm.org/D19658
llvm-svn: 268488
Andrey Turetskiy [Wed, 4 May 2016 11:10:29 +0000 (11:10 +0000)]
Add a test for driver options from m_x86_Features_Group.
Differential Revision: http://reviews.llvm.org/D19658
llvm-svn: 268487
Simon Atanasyan [Wed, 4 May 2016 10:15:12 +0000 (10:15 +0000)]
[ELF][MIPS] Fix typo in the comment. NFC.
llvm-svn: 268486
Simon Atanasyan [Wed, 4 May 2016 10:07:38 +0000 (10:07 +0000)]
[ELF][MIPS] Read/write .MIPS.options section
MIPS N64 ABI introduces .MIPS.options section which specifies miscellaneous
options to be applied to an object/shared/executable file. LLVM as well as
modern versions of GNU tools read and write the only type of the options -
ODK_REGINFO. It is exact copy of .reginfo section used by O32 ABI.
llvm-svn: 268485
Manuel Klimek [Wed, 4 May 2016 09:45:44 +0000 (09:45 +0000)]
When renaming a class, ename pointers to that class as well.
Patch by Miklos Vajna.
llvm-svn: 268484
Chris Dewhurst [Wed, 4 May 2016 09:33:30 +0000 (09:33 +0000)]
[Sparc] Implement __builtin_setjmp, __builtin_longjmp back-end.
This code implements builtin_setjmp and builtin_longjmp exception handling intrinsics for 32-bit Sparc back-ends.
The code started as a mash-up of the PowerPC and X86 versions, although there are sufficient differences to both that had to be made for Sparc handling.
Note: I have manual tests running. I'll work on a unit test and add that to the rest of this diff in the next day.
Also, this implementation is only for 32-bit Sparc. I haven't focussed on a 64-bit version, although I have left the code in a prepared state for implementing this, including detecting pointer size and comments indicating where I suspect there may be differences.
Differential Revision: http://reviews.llvm.org/D19798
llvm-svn: 268483
Daniel Sanders [Wed, 4 May 2016 09:08:35 +0000 (09:08 +0000)]
[mips] Remove -mattr=+n64 and fix indentation in tailcall.ll RUN lines. NFC.
-mattr=+n64 isn't the correct way to specify the ABI and N64 is already the
default for the RUN line concerned.
llvm-svn: 268482
Michael Zuckerman [Wed, 4 May 2016 08:55:11 +0000 (08:55 +0000)]
[Clang][Builtin][AVX512] Adding intrinsics fot cvt{u}si2s{d|s} cvt{sd|ss}2{ss|sd} instruction set
Differential Revision: http://reviews.llvm.org/D19765
llvm-svn: 268481
Eric Liu [Wed, 4 May 2016 08:22:35 +0000 (08:22 +0000)]
Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.
Summary: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.
Reviewers: hokein, djasper, klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19869
llvm-svn: 268480
David Majnemer [Wed, 4 May 2016 06:13:33 +0000 (06:13 +0000)]
[ConstantFolding, ValueTracking] Fold constants involving bitcasts of ConstantVector
We assumed that ConstantVectors would be rather uninteresting from the
perspective of analysis. However, this is not the case due to a quirk
of how LLVM handles vectors of i1. Vectors of i1 are not
ConstantDataVectors like vectors of i8, i16, i32 or i64 because i1's
SizeInBits differs from it's StoreSizeInBytes. This leads to it being
categorized as a ConstantVector instead of a ConstantDataVector.
Instead, treat ConstantVector more uniformly.
This fixes PR27591.
llvm-svn: 268479
Simon Atanasyan [Wed, 4 May 2016 05:58:57 +0000 (05:58 +0000)]
[llvm-readobj] Print MIPS .MIPS.options section content
.MIPS.options section specifies miscellaneous options to be applied
to an object file. LLVM as well as modern versions of GNU tools emit
the only type of the options - ODK_REGINFO. The patch teaches llvm-readobj
to print details of the ODK_REGINFO and skip contents of other options.
llvm-svn: 268478
Saleem Abdulrasool [Wed, 4 May 2016 04:22:29 +0000 (04:22 +0000)]
libc++abi: fix visibility of personalities
The personality routines need to be exposed to the users as the functions
reference the personality routine to handle exceptions.
llvm-svn: 268477
Davide Italiano [Wed, 4 May 2016 03:21:20 +0000 (03:21 +0000)]
[IPO/ConstantMerge] Convert to static function, to facilitate transition to the new PM.
llvm-svn: 268476
Jason Molenda [Wed, 4 May 2016 03:09:40 +0000 (03:09 +0000)]
Add a way for an ObjectFile to indicate that assembly emulation
should not be used for this module -- for use when an ObjectFile
knows that it does not have meaningful or accurate function start
addresses.
More commonly, it is not clear that function start addresses are
missing in a module. There are certain cases on Mac OS X where we
can tell that a Mach-O binary has been stripped of this essential
information, and the unwinder can end up emulating many megabytes
of instructions for a single "function" in the binary.
When a Mach-O binary is missing both an LC_FUNCTION_STARTS load
command (very unusual) and an eh_frame section, then we will assume
it has also been stripped of symbols and that instruction emulation
will not be useful on this module.
<rdar://problem/
25988067>
llvm-svn: 268475
Reid Kleckner [Wed, 4 May 2016 02:58:24 +0000 (02:58 +0000)]
[X86] Add -malign-double support
The -malign-double flag causes i64 and f64 types to have alignment 8
instead of 4. On x86-64, the behavior of -malign-double is enabled by default.
Rebases and cleans phosek's work here: http://reviews.llvm.org/D12860
Patch by Sean Klein
Reviewers: rnk
Subscribers: rnk, jfb, dschuff, phosek
Differential Revision: http://reviews.llvm.org/D19734
llvm-svn: 268473
Zachary Turner [Wed, 4 May 2016 01:46:59 +0000 (01:46 +0000)]
Make ListScope and DictScope re-use the same code.
llvm-svn: 268472
Ben Langmuir [Wed, 4 May 2016 00:53:13 +0000 (00:53 +0000)]
Fix CodeCompletion & TypoCorrection when combining a PCH with Modules
This commit fixes the IdentifierIterator to actually include identifiers
from a PCH or precompiled preamble when there is also a global module
index. This was causing code-completion (outside of C++) and
typo-correction to be missing global identifiers defined in the
PCH/preamble. Typo-correction has been broken since we first started
using the module index, whereas code-completion only started relying on
identifier iterator in r232793.
rdar://problem/
25642879
llvm-svn: 268471
David Majnemer [Wed, 4 May 2016 00:22:23 +0000 (00:22 +0000)]
[X86] Lower zext i1 arguments
i1 is now a legal type for X86 with AVX512.
There were some paths in X86FastISel which were not quite ready to see
an i1 value: they were not quite sure how to deal with sign/zero extends
for call arguments.
DTRT by extending to i8 for zeroext and bailing out of FastISel for
signext.
This fixes PR27591.
llvm-svn: 268470
Richard Smith [Wed, 4 May 2016 00:21:33 +0000 (00:21 +0000)]
Remove (unused) "using namespace llvm;" in Support header. This caused the modules build to break.
llvm-svn: 268469
David Majnemer [Wed, 4 May 2016 00:20:48 +0000 (00:20 +0000)]
[GlobalDCE, Misc] Don't remove functions referenced by ifuncs
We forgot to consider the target of ifuncs when considering if a
function was alive or dead.
N.B. Also update a few auxiliary tools like bugpoint and
verify-uselistorder.
This fixes PR27593.
llvm-svn: 268468
Jim Ingham [Wed, 4 May 2016 00:06:23 +0000 (00:06 +0000)]
You have to call setHasLoadedFieldsFromExternalStorage AFTER calling
the field_begin that starts the copy or it won't do anything.
This causes failures, but only in complex apps, I haven't found
a reduced test case for this yet.
<rdar://problem/
21951798>
llvm-svn: 268467
Mike Aizatsky [Tue, 3 May 2016 23:43:45 +0000 (23:43 +0000)]
[sanitizer] Move stat/__xstat to the common interceptors
Summary:
Adds stat/__xstat to the common interceptors.
Removes the now-duplicate stat/__xstat interceptor from msan/tsan/esan.
This adds stat/__xstat to asan, which previously did not intercept it.
Resubmit of http://reviews.llvm.org/D19875 with win build fixes.
Reviewers: aizatsky, eugenis
Subscribers: tberghammer, llvm-commits, danalbert, vitalybuka, bruening, srhines, kubabrecka, kcc
Differential Revision: http://reviews.llvm.org/D19890
llvm-svn: 268466
Vedant Kumar [Tue, 3 May 2016 23:32:31 +0000 (23:32 +0000)]
[Support] Add a free toString function for Error
toString() consumes an Error and returns a string representation of its
contents. This commit also adds a message() method to ErrorInfoBase for
convenience.
Differential Revision: http://reviews.llvm.org/D19883
llvm-svn: 268465
NAKAMURA Takumi [Tue, 3 May 2016 23:25:47 +0000 (23:25 +0000)]
llvm-pdbdump: Update libdeps.
llvm-svn: 268464
Kevin Enderby [Tue, 3 May 2016 23:13:50 +0000 (23:13 +0000)]
Produce another specific error message for a malformed Mach-O file when a load
command has a size less than 8 bytes.
I think the existing test case in test/Object/macho-invalid.test for
macho64-invalid-too-small-load-command was trying to test for this but that
test case triggered a different error given how it was constructed. So I
constructed a new test case that would trigger this specific error.
I also changed the error message to be consistent with the other malformed Mach-O
file error messages. I also removed object_error::macho_small_load_command from
Object/Error.h as it is not needed and can just use object_error::parse_failed
and let the error message string distinguish the error.
llvm-svn: 268463
Paul Osmialowski [Tue, 3 May 2016 23:10:20 +0000 (23:10 +0000)]
NFC remove unneded spaces (test commit)
llvm-svn: 268462
Felix Berger [Tue, 3 May 2016 23:07:44 +0000 (23:07 +0000)]
[clang-tidy] MoveConstructorInitCheck - Add parameter name to check message.
Reviewers: alexfh
Subscribers: aaron.ballman, cfe-commits
Differential Revision: http://reviews.llvm.org/D19849
llvm-svn: 268461
David Blaikie [Tue, 3 May 2016 23:06:40 +0000 (23:06 +0000)]
[modules][debuginfo] Only include imported modules when targeting LLDB
These constructs are only applicable to a debugger capable of loading a
Clang AST, so omit them for brevity when not doing so.
We could potentially propagate more of CodeGenOptions through the
ObjectFilePCGContainerOperations for consistency (so the next person who
adds some CodeGenOpts feature that tweaks debug info output doesn't get
caught by this), so I'm open to objections/alternatives there, but went
with this for now.
Tested just a couple of basic cases (one direct, one indirect (through
the ObjectFilePCHContainerOperations) & fixed up other cases to pass the
-debugger-tuning flag as appropriate.
llvm-svn: 268460
Eric Fiselier [Tue, 3 May 2016 22:50:33 +0000 (22:50 +0000)]
Update version numbers in docs
llvm-svn: 268459
Zachary Turner [Tue, 3 May 2016 22:37:12 +0000 (22:37 +0000)]
Fix template type deduction error on some compilers.
llvm-svn: 268458
Andrew Kaylor [Tue, 3 May 2016 22:32:30 +0000 (22:32 +0000)]
Add opt-bisect support to additional passes that can be skipped
Differential Revision: http://reviews.llvm.org/D19882
llvm-svn: 268457
Eric Fiselier [Tue, 3 May 2016 22:32:08 +0000 (22:32 +0000)]
Add documentation for new experimental library
llvm-svn: 268456
Zachary Turner [Tue, 3 May 2016 22:26:46 +0000 (22:26 +0000)]
Remove unused variable.
llvm-svn: 268455
Zachary Turner [Tue, 3 May 2016 22:18:17 +0000 (22:18 +0000)]
Move CodeViewTypeStream to DebugInfo/CodeView
Ability to parse codeview type streams is also needed by
DebugInfoPDB for parsing PDBs, so moving this into a library
gives us this option. Since DebugInfoPDB had already hand
rolled some code to do this, that code is now convereted over
to using this common abstraction.
Differential Revision: http://reviews.llvm.org/D19887
Reviewed By: dblaikie, amccarth
llvm-svn: 268454
David Blaikie [Tue, 3 May 2016 22:14:14 +0000 (22:14 +0000)]
[scan-build] fix dead store warnings emitted on clang code base
This fixes dead store warnings of the type "dead assignment" reported
by CLang Static Analyzer on the following file:
- tools/c-index-test/c-index-test.c.
Patch by Apelete Seketeli <apelete@seketeli.net>!
Differential Revision: http://reviews.llvm.org/D19831
llvm-svn: 268453
Justin Bogner [Tue, 3 May 2016 22:02:31 +0000 (22:02 +0000)]
PM: Port LoopRotation to the new loop pass manager
llvm-svn: 268452
Eric Fiselier [Tue, 3 May 2016 21:58:07 +0000 (21:58 +0000)]
Make check-libcxx dependant on libc++experimental if present.
llvm-svn: 268451
Simon Pilgrim [Tue, 3 May 2016 21:55:37 +0000 (21:55 +0000)]
[X86][XOP] Add placeholder VPERMIL2 combining tests
llvm-svn: 268450
Mike Aizatsky [Tue, 3 May 2016 21:49:56 +0000 (21:49 +0000)]
Revert "[sanitizer] Move stat/__xstat to the common interceptors"
This reverts commit 268440 because it breaks the windows bot.
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/21425/steps/build%20compiler-rt/logs/stdio
llvm-svn: 268448
Justin Bogner [Tue, 3 May 2016 21:47:32 +0000 (21:47 +0000)]
PM: Port LoopSimplifyCFG to the new pass manager
llvm-svn: 268446
Simon Pilgrim [Tue, 3 May 2016 21:44:45 +0000 (21:44 +0000)]
[X86] Tidied up SDValue's SDNode referencing. NFCI.
llvm-svn: 268445
Justin Bogner [Tue, 3 May 2016 21:35:08 +0000 (21:35 +0000)]
PM: Check that loop passes preserve a basic set of analyses
A loop pass that didn't preserve this entire set of passes wouldn't
play well with other loop passes, since these are generally a basic
requirement to do any interesting transformations to a loop.
Adds a helper to get the set of analyses a loop pass should preserve,
and checks that any loop pass we run satisfies the requirement.
llvm-svn: 268444
Eric Fiselier [Tue, 3 May 2016 21:30:18 +0000 (21:30 +0000)]
Create new library 'libc++experimental.a' for packaging TS symbols.
Summary:
Out-of-line symbols for <experimental/...> headers are not ABI or API stable and cannot live in the 'libc++.dylib'. Currently they have nowhere to live. I would like to add a new library target `libc++experimental.a` to fix this.
Previously I had suggested different libraries for different TS's (`libc++filesystem.a`, 'libc++LFTS.a`, ect). I no longer think this is the right approach.
Instead `c++experimental` will hold *all* TS implementations as a single monolithic library. I see two main benefits to this:
1. Users only have to know about and manually link one library.
2. It makes it easy to implement TS's with one or two out-of-line symbols. (Ex. PMRs)
`c++experimental` provides NO ABI compatibility. Symbols can freely be added/removed/changed without concern for ABI stability.
I will add documentation for this after landing this patch (but before adding anything to it).
`c++experimental` only builds as a static library. By default CMake will build/test this library but will *NOT* install it.
This patch adds the CMake and LIT logic needed to build/test the new library. Once this lands I plan on using it to implement parts of `<experimental/memory_resource>`.
Reviewers: mclow.lists
Subscribers: cfe-commits, theraven, krememek, dexonsmith, bcraig, beanz, danalbert
Differential Revision: http://reviews.llvm.org/D19856
llvm-svn: 268443
Davide Italiano [Tue, 3 May 2016 21:30:10 +0000 (21:30 +0000)]
[IPO/ConstantMerge] Garbage collect dead code. NFC.
llvm-svn: 268442
Chris Bieneman [Tue, 3 May 2016 21:22:14 +0000 (21:22 +0000)]
Disable LLVM_ENABLE_TIMESTAMPS by default
This change is based on the discussion from http://lists.llvm.org/pipermail/llvm-dev/2016-May/098990.html.
The goal is to make the default LLVM configuration build deterministically.
llvm-svn: 268441
Mike Aizatsky [Tue, 3 May 2016 21:22:06 +0000 (21:22 +0000)]
[sanitizer] Move stat/__xstat to the common interceptors
Summary:
Adds stat/__xstat to the common interceptors.
Removes the now-duplicate stat/__xstat interceptor from msan/tsan/esan.
This adds stat/__xstat to asan, which previously did not intercept it.
Reviewers: aizatsky, eugenis
Subscribers: tberghammer, danalbert, srhines, kubabrecka, llvm-commits, vitalybuka, eugenis, kcc, bruening
Differential Revision: http://reviews.llvm.org/D19875
llvm-svn: 268440
Vedant Kumar [Tue, 3 May 2016 21:04:42 +0000 (21:04 +0000)]
[Support] Drop template line in favor of 'inline'
Reviewed-by: lhames
llvm-svn: 268438
Tim Northover [Tue, 3 May 2016 21:03:41 +0000 (21:03 +0000)]
X86-Darwin: start emitting data-region directives for jump-tables.
The surrounding tools can cope these days, and they were invented for a reason.
llvm-svn: 268437
Sanjoy Das [Tue, 3 May 2016 20:58:10 +0000 (20:58 +0000)]
[RS4GC] Add a test case around calling conventions; NFC
llvm-svn: 268436
Rafael Espindola [Tue, 3 May 2016 20:55:47 +0000 (20:55 +0000)]
Implement --build-id=none.
Both bfd and gold have this. It allows disabling build-id when it is the
default with by adding -Wl,--build-id=none no the clang command line.
llvm-svn: 268435
Reid Kleckner [Tue, 3 May 2016 20:53:20 +0000 (20:53 +0000)]
[ADT] Add drop_front method to ArrayRef
We have it for StringRef but not ArrayRef, and ArrayRef has drop_back,
so I see no reason it shouldn't have drop_front. Splitting this out of a
change that I have that will use this funcitonality.
llvm-svn: 268434
Sean Callanan [Tue, 3 May 2016 20:36:06 +0000 (20:36 +0000)]
Added a testcase for the ptr_refs tool so we catch if it stops working.
llvm-svn: 268433
David L Kreitzer [Tue, 3 May 2016 20:20:59 +0000 (20:20 +0000)]
Add address space 258 (X86 SS segment) to clang documentation.
The change reflects llvm r268431.
Patch by Michael Lemay (michael.lemay@intel.com)
Differential Revision: http://reviews.llvm.org/D19458
llvm-svn: 268432
David L Kreitzer [Tue, 3 May 2016 20:16:08 +0000 (20:16 +0000)]
Add an address space for the X86 SS segment.
Patch by Michael LeMay (michael.lemay@intel.com)
Differential Revision: http://reviews.llvm.org/D17093
llvm-svn: 268431
Samuel Benzaquen [Tue, 3 May 2016 20:11:09 +0000 (20:11 +0000)]
[clang-tidy] Speedup misc-static-assert.
Summary:
Speedup the misc-static-assert check by not use `stmt()` as the toplevel matcher.
The framework runs a filter on the matchers before trying them on each node and
uses the toplevel type for this.
Using `stmt()` as the toplevel causes the matcher to be run on every `Stmt` node,
even if the node doesn't match the desired types.
This change speeds up clang-tidy by ~5% in a benchmark.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19877
llvm-svn: 268430
Davide Italiano [Tue, 3 May 2016 20:08:24 +0000 (20:08 +0000)]
[IPO/IPCP] Convert to use static functions. NFC.
In preparation for porting this pass to the new PM.
llvm-svn: 268429
Vedant Kumar [Tue, 3 May 2016 20:01:01 +0000 (20:01 +0000)]
[ProfileData] Propagate an error from InstrProfSymtab
CovMapFuncReader::get should propagate up errors from InstrProfSymtab.
This is part of a series of patches to transition ProfileData over to
the stricter Error/Expected interface.
llvm-svn: 268428
Chris Bieneman [Tue, 3 May 2016 19:48:11 +0000 (19:48 +0000)]
[CMake] NFC. Add support for testing the compiler without testing the linker
Summary:
One of the big limitations we have in the compiler-rt build system today is that we cannot bootstrap building the builtins because you need a fully functional toolchain to pass CMake's tests.
This change adds support for compile only tests.
It is NFC because nothing is using the compile-only tests yet.
I believe this is the last separable part of D16653.
Reviewers: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19692
llvm-svn: 268427
Derek Bruening [Tue, 3 May 2016 19:44:32 +0000 (19:44 +0000)]
[esan] Use do-while rather than braces for empty interceptors
Summary:
Replaces {} with a do..while sequence in esan's empty interceptors to allow
natural use with a trailing semicolon. The sequence uses each argument to
avoid warnings.
Reviewers: filcab
Subscribers: kubabrecka, llvm-commits, zhaoqin
Differential Revision: http://reviews.llvm.org/D19832
llvm-svn: 268426
Davide Italiano [Tue, 3 May 2016 19:39:15 +0000 (19:39 +0000)]
[IPO/GlobalDCE] Port to the new pass manager.
Differential Revision: http://reviews.llvm.org/D19782
llvm-svn: 268425
Jack Liu [Tue, 3 May 2016 19:30:48 +0000 (19:30 +0000)]
[SROA] Function canConvertValue needs to check whether both NewTy and OldTy pointers are
pointing to the same addr space. This can prevent SROA from creating a bitcast
between pointers with different addr spaces.
Differential Revision: http://reviews.llvm.org/D19697
llvm-svn: 268424
Tim Northover [Tue, 3 May 2016 19:24:47 +0000 (19:24 +0000)]
AArch64: fixup comment after change
llvm-svn: 268423
Tim Northover [Tue, 3 May 2016 19:22:41 +0000 (19:22 +0000)]
AArch64: simplify illegal vector check. NFC.
Use a utility function to check whether the number of elements is a power of 2
and drop the redundant upper limit (a 128-bit vector with more than 16 elements
would have each element < 8 bits, not possible).
llvm-svn: 268422
Jack Liu [Tue, 3 May 2016 19:15:02 +0000 (19:15 +0000)]
Revert 268409 due to missing comment.
llvm-svn: 268421
Vedant Kumar [Tue, 3 May 2016 18:49:41 +0000 (18:49 +0000)]
[ProfileData] Assert NoError in CoverageMappingTest
Check for success values in the CoverageMappingTest unit test file.
This is part of a series of patches to transition ProfileData over to
the stricter Error/Expected interface.
llvm-svn: 268420
Reid Kleckner [Tue, 3 May 2016 18:48:50 +0000 (18:48 +0000)]
Fix use of LLVM IR names in lit test
llvm-svn: 268419
Reid Kleckner [Tue, 3 May 2016 18:44:29 +0000 (18:44 +0000)]
[MS] Pass CalleeDecl to adjustThisArgumentForVirtualFunctionCall
If we are devirtualizing, then we want to compute the 'this' adjustment
of the devirtualized target, not the adjustment of the base's method
definition, which is usually zero.
Fixes PR27621
llvm-svn: 268418