Commit Graph

246848 Commits

Author SHA1 Message Date
Zachary Turner 218ce83f0b [PDB] Begin adding documentation for the PDB file format.
Differential Revision: https://reviews.llvm.org/D26374

llvm-svn: 286491
2016-11-10 19:24:21 +00:00
Chris Bieneman 58ddb8d041 [Test-Suite] Fix all the sanitizer tests to be based on compiler capabilities
Summary: This patch reworks all the @skip... lines for sanitizer libraries to be based on whether or not the compiler actually works, rather than whether or not the compiler-rt sources are present in some magically derived directory.

Reviewers: lldb-commits

Subscribers: kubabrecka, tfiala

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

llvm-svn: 286490
2016-11-10 19:16:17 +00:00
Adam Nemet 916f445535 [opt-viewer] Avoid duplicated remarks
This can happen if a pass is run multiple times or if the code is in a
header file which is included multiple times.

llvm-svn: 286489
2016-11-10 18:42:56 +00:00
Davide Italiano a22ddddfea [Target] Rename X86/ARM Assembly printer to reflect reality.
This shows up a lot profiling LTO testcases with -time-passes, so
better have a non confusing name.

llvm-svn: 286488
2016-11-10 18:39:31 +00:00
Alex Lorenz a5430bd5d6 Add -Wduplicate-protocol for existing diagnostic
Expose a warning flag for warn_duplicate_protocol_def. This allows control
over the severity of duplicate protocol definitions.

For example -Werror=duplicate-protocol or
#pragma clang diagnostic ignored "-Wduplicate-protocol".

Patch provided by Dave Lee!

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

llvm-svn: 286487
2016-11-10 18:30:26 +00:00
Eric Liu 6aa9416d06 Handle adding new nested namespace in old namespace.
Reviewers: hokein

Subscribers: cfe-commits

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

llvm-svn: 286486
2016-11-10 18:29:01 +00:00
Eric Liu 231c655851 [change-namespace] dyn_cast -> cast.
llvm-svn: 286485
2016-11-10 18:15:34 +00:00
Eugene Zelenko b81f81b9d9 Fix some Clang-tidy modernize-use-default and readability-redundant-member-init and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D26087

llvm-svn: 286484
2016-11-10 18:02:34 +00:00
Nico Weber 85740f6b86 Revert r286437 r286438, they caused PR30976
llvm-svn: 286483
2016-11-10 17:55:41 +00:00
Adam Nemet 7da20c39ee [OptDiag] Remove non-printable chars from function name
The r283656 did this in the remark arguments.  We also need to do this
in the main function attribute as that is written to YAML as well.

llvm-svn: 286482
2016-11-10 17:47:03 +00:00
Simon Pilgrim d67af68f06 [SelectionDAG] Add support for vector demandedelts in TRUNCATE opcodes
llvm-svn: 286481
2016-11-10 17:43:52 +00:00
Dehao Chen 5492f8646c Add comments about why we put LoopSink pass at the very late stage.
llvm-svn: 286480
2016-11-10 17:42:18 +00:00
Chris Bieneman b92cfe6804 Unify Darwin and Non-Darwin printing of version output
Summary:
This change unifies and simplifies the code paths between the Darwin and non-Darwin code to print the LLDB version information.

It also introduces a new variable in CMake LLDB_VERSION_STRING which can be used to specify custom version information. On Darwin this value is implicitly set based on the resource/LLDB-Info.plist file.

With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version output is:

> ./bin/lldb -version
lldb version 4.0.0 (lldb-360.99.0)
  clang revision 286264
  llvm revision 286265

This behavior is unified across all target platforms.

Reviewers: lldb-commits

Subscribers: mgorny, tfiala

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

llvm-svn: 286479
2016-11-10 17:33:19 +00:00
Kostya Serebryany 56cec3d662 [lsan] fix a rare lsan false positive: ensure that we don't re-sort the chunks_ array while iterating over it. A test is hard to create, but I've added a consistency check that fires w/o the fix on existing tests. The bug analysis and the initial patch were provided by Pierre Bourdon
llvm-svn: 286478
2016-11-10 17:27:28 +00:00
Simon Pilgrim e517f0a417 [X86] Add knownbits vector TRUNC test
In preparation for demandedelts support

llvm-svn: 286477
2016-11-10 17:24:33 +00:00
Adrian McCarthy fa8c99fda9 Un-XFail test on Windows. Has been in "unexpected success" mode for a while.
llvm-svn: 286476
2016-11-10 17:21:22 +00:00
Teresa Johnson a081145ebd Restore part of "[ThinLTO] Prevent exporting of locals used/defined in module level asm"
This restores the part of r286297 that didn't require adding a
dependency from the Analysis to Object library. There are two parts
to the original fix, and this will address the handling for the case
where locals are used in module level asm.

The part that requires functionality in libObject handles local defs
in module level asm, and was reverted because our downstream build
of clang builds lib/Bitcode into a single library, and this new
dependency introduced a cycle there. I am trying to get that fixed
(see D26502), so for now that change isn't being restored

llvm-svn: 286475
2016-11-10 16:57:32 +00:00
Roger Ferrer Ibanez aee391b535 Protect bitset tests under libcpp-no-exceptions
Bitset tests feature a sequence of tests of increasing bitset sizes,
but these tests rely on exceptions when the bitset size is less than
50 elements.

This change adds a flag to tell whether a test should throw. If it must
throw it will be skipped under no-exceptions.

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

llvm-svn: 286474
2016-11-10 16:54:55 +00:00
Simon Pilgrim 33fef8e865 Use common SDLoc. NFCI.
llvm-svn: 286473
2016-11-10 16:47:09 +00:00
Malcolm Parsons e293eab46f [clang-tidy] Add modernize-use-equals-delete check
Summary: Fixes PR27872

Reviewers: klimek, hokein, alexfh, aaron.ballman

Subscribers: Prazek, Eugene.Zelenko, danielmarjamaki, cfe-commits, mgorny

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

llvm-svn: 286472
2016-11-10 16:46:59 +00:00
Simon Pilgrim ee187fd6e7 [SelectionDAG] Add support for vector demandedelts in MUL opcodes
llvm-svn: 286471
2016-11-10 16:27:42 +00:00
Asaf Badouh bb2338e939 reproducer for pr29002
https://reviews.llvm.org/D26449

llvm-svn: 286470
2016-11-10 16:27:27 +00:00
Martin Probst e19acaa361 drop kw_module from ASI protection block
llvm-svn: 286469
2016-11-10 16:21:04 +00:00
Martin Probst 3dbbefae36 clang-format: [JS] do not break after declare namespace.
Summary:
See TypeScript grammar for tokens following 'declare':
https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#A.10

Additional minor change:
clang-format: [JS] Prevent ASI before const.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 286468
2016-11-10 16:21:02 +00:00
Martin Probst 72fd75a0d1 clang-format: [JS] do not break after declare namespace.
See TypeScript grammar for tokens following 'declare':
https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#A.10

llvm-svn: 286467
2016-11-10 16:20:58 +00:00
Malcolm Parsons d784f20c13 [clang-tidy] Add missing meta refresh for cert-msc30-c doc. NFC
llvm-svn: 286466
2016-11-10 16:19:17 +00:00
Alex Lorenz d60bb28307 [Sema] Avoid -Wshadow warnings for shadowed variables that
aren't captured by lambdas with a default capture specifier

This commit is a follow-up to r286354. It avoids the -Wshadow warning for
variables which shadow variables that aren't captured by lambdas with a default
capture specifier. It provides an additional note that points to location of
the capture.

The old behaviour is preserved with -Wshadow-all or -Wshadow-uncaptured-local.

rdar://14984176

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

llvm-svn: 286465
2016-11-10 16:19:11 +00:00
Tom Stellard 115a61560e AMDGPU: Add VI i16 support
Patch By: Wei Ding

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

llvm-svn: 286464
2016-11-10 16:02:37 +00:00
Simon Pilgrim 2cf393c8fe [X86] Add knownbits vector MUL test
In preparation for demandedelts support

llvm-svn: 286463
2016-11-10 15:57:33 +00:00
Rafael Espindola 0e876cfb2e Replace duplicated '16' with a named constant.
Thanks to Michael Spencer for the suggestion.

llvm-svn: 286462
2016-11-10 15:41:34 +00:00
Simon Pilgrim ca57e53ded [SelectionDAG] Add support for vector demandedelts in SRA opcodes
llvm-svn: 286461
2016-11-10 15:05:09 +00:00
Sanjay Patel 40d33e7554 [InstCombine] auto-generate better checks; NFC
Note that the existing metadata checking was re-added by hand because the 
script doesn't currently know how to generate checks for lines outside of 
functions.

llvm-svn: 286460
2016-11-10 14:58:17 +00:00
Rafael Espindola 9f0c4bb795 Parse relocations only once.
Relocations are the last thing that we wore storing a raw section
pointer to and parsing on demand.

With this patch we parse it only once and store a pointer to the
actual data.

The patch also changes where we store it. It is now in
InputSectionBase. Not all sections have relocations, but most do and
this simplifies the logic. It also means that we now only support one
relocation section per section. Given that that constraint is
maintained even with -r with gold bfd and lld, I think it is OK.

llvm-svn: 286459
2016-11-10 14:53:24 +00:00
George Rimar e93e0adbb5 Reverted r286451 "[ELF] - Allow separate form for -f (alias for -auxiliary)."
Though the patch was technically correct,
the only FreeBSD port (noticed atm) that tried using it was
www/mod_jk. And it seems just passed gcc option to linker by mistake:

"-Wl,-L-L/usr/local/lib -Wl,-rpath,/usr/local/lib -Wl,-fstack-protector -Wl,-fstack-protector -o mod_jk.la "

Given that it is an easy mistake to make, reverting for now.

llvm-svn: 286458
2016-11-10 14:48:39 +00:00
Simon Pilgrim 7be6d99442 [X86] Add knownbits vector arithmetic shift test
In preparation for demandedelts support

llvm-svn: 286457
2016-11-10 14:46:24 +00:00
Amara Emerson 652795db16 Add the loop end location to the loop metadata. This additional information
can be used to improve the locations when generating remarks for loops.

Depends on the companion LLVM change r286227.

Patch by Florian Hahn.

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

llvm-svn: 286456
2016-11-10 14:44:30 +00:00
Tony Jiang 7723f97d6a [PowerPC] Implement plain VSX load/store builtins.
Implement all the different 24 overloads for vec_xl and vec_xst.

llvm-svn: 286455
2016-11-10 14:39:56 +00:00
Simon Pilgrim 37c9034bd6 [DAGCombiner] Correctly extract the ConstOrConstSplat shift value for SHL nodes
We were failing to extract a constant splat shift value if the shifted value was being masked.

The (shl (and (setcc) N01CV) N1CV) -> (and (setcc) N01CV<<N1CV) combine was unnecessarily preventing this.

llvm-svn: 286454
2016-11-10 14:35:09 +00:00
Chad Rosier c16824d217 Remove unnecessary check prefix directives. NFC.
llvm-svn: 286453
2016-11-10 14:28:44 +00:00
Simon Pilgrim 87f38fa85c [DAGCombiner] Show missed opportunity to UNDEF out-of-range SHL
Fails to match constant shift value due to presence of AND mask.

llvm-svn: 286452
2016-11-10 14:19:45 +00:00
George Rimar f5a0ef97f5 [ELF] - Allow separate form for -f (alias for -auxiliary).
Without that FreeBSD port was failing with next confuxing error:
/usr/bin/ld: error: unknown argument: -fstack-protector

llvm-svn: 286451
2016-11-10 14:07:15 +00:00
Tobias Grosser 455b9bd65c [RegionInfo] Add three tests that include infinite loops
These examples are variations that were inspired from a small subgraph taken
from paper.ll which are interesting as they show certain issues with infinite
loops.

llvm-svn: 286450
2016-11-10 13:56:19 +00:00
Simon Pilgrim 0e0f29c09f Fix -Wdocumentation warning
llvm-svn: 286449
2016-11-10 13:54:39 +00:00
Simon Pilgrim 3bf99c056a [SelectionDAG] Add support for vector demandedelts in SHL/SRL opcodes
llvm-svn: 286448
2016-11-10 13:52:42 +00:00
Simon Pilgrim ede8ad7c5a [X86] Add knownbits vector logical shift test
In preparation for demandedelts support

llvm-svn: 286447
2016-11-10 13:34:17 +00:00
Oliver Stannard 18ca2adf2d [ARM] Thumb2 LDR (literal) should accept PC as the destination
The version of this instruction with the .w suffix already correctly accepts
this, but the alias without the .w did not.

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

llvm-svn: 286446
2016-11-10 13:20:41 +00:00
Eugene Leviant 12e8a92acd [ELF] Make SyntheticSection::writeTo pure virtual. NFC.
llvm-svn: 286445
2016-11-10 12:50:59 +00:00
Tobias Grosser f67433abd9 SCEVAffinator: pass parameter-only set to addRestriction if BB=nullptr
Assumptions can either be added for a given basic block, in which case the set
describing the assumptions is expected to match the dimensions of its domain.
In case no basic block is provided a parameter-only set is expected to describe
the assumption.

The piecewise expressions that are generated by the SCEVAffinator sometimes
have a zero-dimensional domain (e.g., [p] -> { [] : p <= -129 or p >= 128 }),
which looks similar to a parameter-only domain, but is still a set domain.

This change adds an assert that checks that we always pass parameter domains to
addAssumptions if BB is empty to make mismatches here fail early.

We also change visitTruncExpr to always convert to parameter sets, if BB is
null. This change resolves http://llvm.org/PR30941

Another alternative to this change would have been to inspect all code to make
sure we directly generate in the SCEV affinator parameter sets in case of empty
domains. However, this would likely complicate the code which combines parameter
and non-parameter domains when constructing a statement domain. We might still
consider doing this at some point, but as this likely requires several non-local
changes this should probably be done as a separate refactoring.

Reported-by: Eli Friedman <efriedma@codeaurora.org>
llvm-svn: 286444
2016-11-10 11:44:10 +00:00
Eugene Leviant 41ca327b5e [ELF] Convert .got.plt section to input section
Differential revision: https://reviews.llvm.org/D26349

llvm-svn: 286443
2016-11-10 09:48:29 +00:00
Tobias Grosser d0b9173caa IslAst: always use the context during ast generation
Providing the context to the ast generator allows for additional simplifcations
and -- more importantly -- allows to generate loops with only partially bounded
domains, assuming the domains are bounded for all parameter configurations
that are valid as defined by the context.

This change fixes the crash reported in http://llvm.org/PR30956

The original reason why we did not include the context when generating an
AST was that CLooG and later isl used to sometimes transfer some of the
constraints that bound the size of parameters from the context into the
generated AST. This resulted in operations with very large constants, which
sometimes introduced problematic integer overflows. The latest versions of
the isl AST generator are careful to not introduce such constants.

Reported-by: Eli Friedman <efriedma@codeaurora.org>
llvm-svn: 286442
2016-11-10 09:39:58 +00:00