Commit Graph

224217 Commits

Author SHA1 Message Date
Sanjoy Das dcd3a88e29 [SCEV] Minor naming, braces cleanup; NFC
llvm-svn: 262459
2016-03-02 04:52:22 +00:00
Craig Topper cf65c62737 [X86] Use MCPhysReg and uint16_t for static arrays of registers and opcodes respectively should reduce size tiny bit. NFC
llvm-svn: 262458
2016-03-02 04:42:31 +00:00
Matt Arsenault f2dcb4737b AMDGPU: Fix bug 26659.
Fix checking the same instruction twice instead of the
second branch that uses vccz. I don't think this matters
currently because s_branch_vccnz is always used currently.

llvm-svn: 262457
2016-03-02 04:12:39 +00:00
Matt Arsenault a266bd8760 AMDGPU: Cleanup suggested in bug 23960
llvm-svn: 262456
2016-03-02 04:05:14 +00:00
Matt Arsenault 5de68cbc4c Bug 20810: Use report_fatal_error instead of unreachable
llvm-svn: 262455
2016-03-02 03:33:55 +00:00
Sanjoy Das 6b017a11ba Add a comment with a rational for the unusual code structure
llvm-svn: 262454
2016-03-02 02:56:29 +00:00
Sanjoy Das eca1b53b95 Qualify getRangeForAffineAR with this-> for MSVC
llvm-svn: 262453
2016-03-02 02:44:08 +00:00
George Burgess IV e0e6e48b29 Attempt to fix ASAN failure in a MemorySSA test.
llvm-svn: 262452
2016-03-02 02:35:04 +00:00
Sanjoy Das 1168f93c2b Perturb code in an attempt to appease MSVC
For some reason MSVC seems to think I'm calling getConstant() from a
static context.  Try to avoid this issue by explicitly specifying
'this->' (though I'm not confident that this will actually work).

llvm-svn: 262451
2016-03-02 02:34:20 +00:00
Eugene Zelenko df37055017 Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.
llvm-svn: 262450
2016-03-02 02:18:18 +00:00
Sanjoy Das 62a1c33929 More code permutation to appease MSVC
llvm-svn: 262449
2016-03-02 02:15:42 +00:00
Sanjoy Das 9e5ebf145c Remove "auto" to appease the MSVC bots
llvm-svn: 262448
2016-03-02 01:59:37 +00:00
Rui Ueyama 52968b58f5 Use C++11 initializers for data members.
llvm-svn: 262447
2016-03-02 01:49:27 +00:00
Matt Arsenault 7d0a77b979 DAGCombiner: Make sure an integer is being truncated
llvm-svn: 262446
2016-03-02 01:36:51 +00:00
Rui Ueyama 0c8fad7dba Remove more dead code.
llvm-svn: 262445
2016-03-02 01:34:36 +00:00
Rui Ueyama 0c23bcb252 Remove default implementations that are always overridden by subclasses.
llvm-svn: 262444
2016-03-02 01:34:34 +00:00
Rui Ueyama 01ba8b2f7b Remove more dead code.
llvm-svn: 262443
2016-03-02 01:23:29 +00:00
Reid Kleckner 9cc4b4e042 Add a few dllimport/dllexport tests. NFC
Summary:
This change just adds tests for some corner cases of dllimport/dllexport,
primarily for some static methods.

We plan to enable dllimport/dllexport support for the PS4, and these
additional tests are for points we previously were testing internally.

-Warren Ristow
SN Systems - Sony Computer Entertainment Group

Reviewers: rnk

Subscribers: silvas

Differential Revision: http://reviews.llvm.org/D17775

llvm-svn: 262442
2016-03-02 01:21:48 +00:00
Eugene Zelenko 896ddd03e9 Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.
llvm-svn: 262441
2016-03-02 01:09:03 +00:00
Sanjay Patel 5e4c46de6d revert r262424 because there's a *clang test* for AArch64 that checks -O3 asm output
that is broken by this change

llvm-svn: 262440
2016-03-02 01:04:09 +00:00
Daniel Berlin ab3aefeaa5 Fix SHARED_LIBS build
llvm-svn: 262439
2016-03-02 00:58:48 +00:00
Sanjoy Das bf73098472 [SCEV] Make getRange smarter around selects
Have ScalarEvolution::getRange re-consider cases like "{C?A:B,+,C?P:Q}"
by factoring out "C" and computing RangeOf{A,+,P} union RangeOf({B,+,Q})
instead.

The latter can be easier to compute precisely in cases like
"{C?0:N,+,C?1:-1}" N is the backedge taken count of the loop; since in
such cases the latter form simplifies to [0,N+1) union [0,N+1).

llvm-svn: 262438
2016-03-02 00:57:54 +00:00
Sanjoy Das b765b633cb [SCEV] Extract out a getRangeForAffineAR; NFC
Pure code-motion change.  Will be used later in making getRange more clever.

llvm-svn: 262437
2016-03-02 00:57:39 +00:00
Rui Ueyama ca5e90f83c Remove dead code.
llvm-svn: 262436
2016-03-02 00:43:37 +00:00
Rui Ueyama be34a9c24e Remove remaining files of Core.
llvm-svn: 262435
2016-03-02 00:37:50 +00:00
Rui Ueyama 7a963bf02c Tidy up CMakefiles.
llvm-svn: 262434
2016-03-02 00:31:34 +00:00
Rui Ueyama 165ca7cc39 Remove unused #include's.
llvm-svn: 262431
2016-03-02 00:28:35 +00:00
Chris Bieneman db5294d9c0 [CMake] Add convenience target clang-test-depends to build test dependencies.
This is useful when paired with the distribution targets to build prerequisites for running tests.

llvm-svn: 262429
2016-03-02 00:27:15 +00:00
Chris Bieneman 2d5e077165 [CMake] Add convenience target llvm-test-depends to build test dependencies.
This is useful when paired with the distribution targets to build prerequisites for running tests.

llvm-svn: 262428
2016-03-02 00:27:14 +00:00
Chris Bieneman 2b12f6765b [CMake] Add distribution target that is the "just-build" side of install-distribution
This is just a convenience target to allow limiting what you build.

llvm-svn: 262427
2016-03-02 00:27:12 +00:00
Sanjay Patel 147e927957 [InstCombine] convert 'isPositive' and 'isNegative' vector comparisons to shifts (PR26701)
As noted in the code comment, I don't think we can do the same transform that we do for
*scalar* integers comparisons to *vector* integers comparisons because it might pessimize
the general case. 

Exhibit A for an incomplete integer comparison ISA remains x86 SSE/AVX: it only has EQ and GT
for integer vectors.

But we should now recognize all the variants of this construct and produce the optimal code
for the cases shown in:
https://llvm.org/bugs/show_bug.cgi?id=26701
 

llvm-svn: 262424
2016-03-01 23:55:18 +00:00
Rui Ueyama 947648f502 Make a few utility functions file-scoped.
makeErrorFile and parseMemberFiles are now used only in DarwinLdDriver.cpp.
This patch moves them to that file.

llvm-svn: 262423
2016-03-01 23:52:04 +00:00
Rui Ueyama 958e44b17d Remove dead code.
llvm-svn: 262422
2016-03-01 23:48:03 +00:00
Rui Ueyama 1054ae7e1e Remove CoreDriver.
CoreDriver implements a driver for a hypothetical platform.
It is intended to be used in unittests. However, it is actually
redundant because the features are tested using the real driver
for the real platforms. So we can remove this.

http://reviews.llvm.org/D17698

llvm-svn: 262421
2016-03-01 23:44:05 +00:00
Nico Weber 2ca4be97de clang-cl: Implement initial limited support for precompiled headers.
In the gcc precompiled header model, one explicitly runs clang with `-x
c++-header` on a .h file to produce a gch file, and then includes the header
with `-include foo.h` and if a .gch file exists for that header it gets used.
This is documented at
http://clang.llvm.org/docs/UsersManual.html#precompiled-headers

cl.exe's model is fairly different, and controlled by the two flags /Yc and
/Yu. A pch file is generated as a side effect of a regular compilation when
/Ycheader.h is passed. While the compilation is running, the compiler keeps
track of #include lines in the main translation unit and writes everything up
to an `#include "header.h"` line into a pch file. Conversely, /Yuheader.h tells
the compiler to skip all code in the main TU up to and including `#include
"header.h"` and instead load header.pch. (It's also possible to use /Yc and /Yu
without an argument, in that case a `#pragma hrdstop` takes the role of
controlling the point where pch ends and real code begins.)

This patch implements limited support for this in that it requires the pch
header to be passed as a /FI force include flag – with this restriction,
it can be implemented almost completely in the driver with fairly small amounts
of code. For /Yu, this is trivial, and for /Yc a separate pch action is added
that runs before the actual compilation. After r261774, the first failing
command makes a compilation stop – this means if the pch fails to build the
main compilation won't run, which is what we want. However, in /fallback builds
we need to run the main compilation even if the pch build fails so that the
main compilation's fallback can run. To achieve this, add a ForceSuccessCommand
that pretends that the pch build always succeeded in /fallback builds (the main
compilation will then fail to open the pch and run the fallback cl.exe
invocation).

If /Yc /Yu are used in a setup that clang-cl doesn't implement yet, clang-cl
will now emit a "not implemented yet; flag ignored" warning that can be
disabled using -Wno-clang-cl-pch.

Since clang-cl doesn't yet serialize some important things (most notably
`pragma comment(lib, ...)`, this feature is disabled by default and only
enabled by an internal driver flag. Once it's more stable, this internal flag
will disappear.

(The default stdafx.h setup passes stdafx.h as explicit argument to /Yc but not
as /FI – instead every single TU has to `#include <stdafx.h>` as first thing it
does. Implementing support for this should be possible with the approach in
this patch with minimal frontend changes by passing a --stop-at / --start-at
flag from the driver to the frontend. This is left for a follow-up. I don't
think we ever want to support `#pragma hdrstop`, and supporting it with this
approach isn't easy: This approach relies on the driver knowing the pch
filename in advance, and `#pragma hdrstop(out.pch)` can set the output
filename, so the driver can't know about it in advance.)

clang-cl now also honors /Fp and puts pch files in the same spot that cl.exe
would put them, but the pch file format is of course incompatible. This has
ramifications on /fallback, so /Yc /Yu aren't passed through to cl.exe in
/fallback builds.

http://reviews.llvm.org/D17695

llvm-svn: 262420
2016-03-01 23:16:44 +00:00
Dehao Chen 1012be120a Perform InstructioinCombiningPass before SampleProfile pass.
Summary: SampleProfile pass needs to be performed after InstructionCombiningPass, which helps eliminate un-inlinable function calls.

Reviewers: davidxl, dnovillo

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D17742

llvm-svn: 262419
2016-03-01 22:53:02 +00:00
Simon Pilgrim 2e6a9a290b Updated SSE41 builtin tests to more closely match the llvm fast-isel equivalent tests
llvm-svn: 262418
2016-03-01 22:38:33 +00:00
Kostya Serebryany 3d95dd9149 [libFuzzer] deprecate exit_on_first flag
llvm-svn: 262417
2016-03-01 22:33:14 +00:00
David Blaikie f72dbc101c llvm-dwp: Add missing copyright notice to llvm-dwp.cpp
Addressing feedback on IRC by Sean Silva.

llvm-svn: 262416
2016-03-01 22:29:00 +00:00
Kostya Serebryany 228d5b1ce4 [libFuzzer] add generic signal handlers so that libFuzzer can report at least something if ASan is not handlig the signals for us. Remove abort_on_timeout flag.
llvm-svn: 262415
2016-03-01 22:19:21 +00:00
John McCall 07daf721fb Mangle extended qualifiers in the proper order and mangle the
ARC ownership-convention function type modifications.

According to the Itanium ABI, vendor extended qualifiers are
supposed to be mangled in reverse-alphabetical order before
any CVR qualifiers.  The ARC function type conventions are
plausibly order-significant (they are associated with the
function type), which permits us to ignore the need to correctly
inter-order them with any other vendor qualifiers on the parameter
and return types.

Implementing these rules correctly is technically an ABI break.
Apple is comfortable with the risk of incompatibility here for
the ARC features, and I believe that address-space qualification
is still uncommon enough to allow us to adopt the conforming
rule without serious risk.  Still, targets which make heavy
use of address space qualification may want to revert to the
non-conforming order.

llvm-svn: 262414
2016-03-01 22:18:03 +00:00
Rui Ueyama 148945eb17 Fix --help message.
llvm-svn: 262413
2016-03-01 22:17:09 +00:00
Simon Pilgrim a3ad9cd793 [X86][SSE41] Added missing fast-isel intrinsics tests
Match IR generated in clang/test/CodeGen/sse41-builtins.c

llvm-svn: 262412
2016-03-01 22:05:05 +00:00
Colin LeMahieu 2d497a0078 [NFC] Convert tabs to spaces.
llvm-svn: 262411
2016-03-01 22:05:03 +00:00
Simon Pilgrim 9c03d1313c [X86][XOP] Regenerated intrinsics tests
llvm-svn: 262410
2016-03-01 21:58:50 +00:00
Daniel Sanders c1eb1e0419 Explicitly select IAS on one more RUN line in new embed-bitcode.c test.
This should fix clang-cmake-mips builder since MIPS does not have IAS enabled
by default (yet).

llvm-svn: 262409
2016-03-01 21:57:22 +00:00
Matthias Braun 37d884fdf4 AArch64: Reenable CompleteModel for A53, A57 and Kryo models
The fixes in r262393 completed them as well.

llvm-svn: 262408
2016-03-01 21:55:35 +00:00
Ted Woodward 7071c5fd64 Fix bug with function resolution when using IR Interpreter
Summary: Recent changes to the expression parser broke function name resolution when using the IR interpreter instead of JIT. This patch changes the IRMemoryMap ivar in InterpreterStackFrame to an IRExecutionUnitSP (which is a subclass), allowing InterpreterStackFrame::ResolveConstantValue() to call FindSymbol() on the name of the Value when it's a FunctionVal. It also changes IRExecutionUnit::FindInSymbols() to call GetFileAddress() on the symball if ResolveCallableAddress() fails and there is no valid Process.

Reviewers: spyffe

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17745

llvm-svn: 262407
2016-03-01 21:53:26 +00:00
Simon Pilgrim b1f5c62d5f [X86][AVX2] Regenerated 256-bit vector / 64-bit element permute tests
llvm-svn: 262406
2016-03-01 21:53:12 +00:00
Tim Northover d59b23a5ae Fix typo. NFC.
llvm-svn: 262405
2016-03-01 21:45:22 +00:00