Paul Robinson [Tue, 25 Nov 2014 17:28:54 +0000 (17:28 +0000)]
Try to fix a ppc64 bot. What is this 'signext' stuff anyway?
No wonder most people use specific triples.
llvm-svn: 222769
Hans Wennborg [Tue, 25 Nov 2014 17:23:05 +0000 (17:23 +0000)]
LazyValueInfo: Actually re-visit partially solved block-values in solveBlockValue()
If solveBlockValue() needs results from predecessors that are not already
computed, it returns false with the intention of resuming when the dependencies
have been resolved. However, the computation would never be resumed since an
'overdefined' result had been placed in the cache, preventing any further
computation.
The point of placing the 'overdefined' result in the cache seems to have been
to break cycles, but we can check for that when inserting work items in the
BlockValue stack instead. This makes the "stop and resume" mechanism of
solveBlockValue() work as intended, unlocking more analysis.
Using this patch shaves 120 KB off a 64-bit Chromium build on Linux.
I benchmarked compiling bzip2.c at -O2 but couldn't measure any difference in
compile time.
Tests by Jiangning Liu from r215343 / PR21238, Pete Cooper, and me.
Differential Revision: http://reviews.llvm.org/D6397
llvm-svn: 222768
Joerg Sonnenberger [Tue, 25 Nov 2014 17:14:22 +0000 (17:14 +0000)]
Small model and JIT generally don't go well with each other.
On LP64 platforms, it will work or not depending on the choosen memory
layout, so neither PASS nor XFAIL is appropiate.
As UNSUPPORTED as per-test target doesn't exist (yet), remove the test
instead to unbreak the builds.
llvm-svn: 222767
Tobias Grosser [Tue, 25 Nov 2014 17:09:21 +0000 (17:09 +0000)]
Add PreHeader always to OuterLoop
This fixes a bug introduce in r217525.
llvm-svn: 222766
Manuel Klimek [Tue, 25 Nov 2014 17:01:06 +0000 (17:01 +0000)]
Re-apply r222646 (was reverted in r222667). Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName
Change to original: ifndef out tests in Windows due to /-separated
paths.
Summary:
Often one is only interested in matches within the main-file or matches
that are not within a system-header, for which this patch adds
isInMainFile and isInSystemFile. They take no arguments and narrow down
the matches.
The isInFileMatchingName is mainly thought for interactive
clang-query-sessions, to make a matcher more specific without restarting
the session with the files you are interested in for that moment. It
takes a string that will be used as regular-expression to match the
filename of where the matched node is expanded.
Patch by Hendrik von Prince.
llvm-svn: 222765
Rafael Espindola [Tue, 25 Nov 2014 15:33:40 +0000 (15:33 +0000)]
Set the body of a new struct as soon as it is created.
This changes the order in which different types are passed to get, but
one order is not inherently better than the other.
The main motivation is that this simplifies linkDefinedTypeBodies now that
it is only linking "real" opaque types. It is also means that we only have to
call it once and that we don't need getImpl.
A small change in behavior is that we don't copy type names when resolving
opaque types. This is an improvement IMHO, but it can be added back if
desired. A test is included with the new behavior.
llvm-svn: 222764
Evgeniy Stepanov [Tue, 25 Nov 2014 15:24:07 +0000 (15:24 +0000)]
[msan] Annotate zlib functions for MemorySanitizer.
Mark destination buffer in zlib::compress and zlib::decompress as fully
initialized.
When building LLVM with system zlib and MemorySanitizer instrumentation,
MSan does not observe memory writes in zlib code and erroneously considers
zlib output buffers as uninitialized, resulting in false use-of-uninitialized
memory reports. This change helps MSan understand the state of that memory
and prevents such reports.
llvm-svn: 222763
Evgeniy Stepanov [Tue, 25 Nov 2014 15:00:23 +0000 (15:00 +0000)]
[msan] Remove leftover MSanDR bits in tests.
llvm-svn: 222762
Rafael Espindola [Tue, 25 Nov 2014 14:35:53 +0000 (14:35 +0000)]
Misc style fixes. NFC.
This just reduces the noise in the next patch.
llvm-svn: 222761
Joerg Sonnenberger [Tue, 25 Nov 2014 13:37:55 +0000 (13:37 +0000)]
Reapply 222538 and update tests to explicitly request small code model
and PIC:
Allow FDE references outside the +/-2GB range supported by PC relative
offsets for code models other than small/medium. For JIT application,
memory layout is less controlled and can result in truncations
otherwise.
Patch from Akos Kiss.
Differential Revision: http://reviews.llvm.org/D6079
llvm-svn: 222760
Joerg Sonnenberger [Tue, 25 Nov 2014 13:28:56 +0000 (13:28 +0000)]
Mark as explicit failing on x86-64 -- small memory model doesn't agree
with default address selections.
llvm-svn: 222759
Rafael Espindola [Tue, 25 Nov 2014 13:19:46 +0000 (13:19 +0000)]
Remove a bit of duplicated code.
Exactly the same checks are present in areTypesIsomorphic.
This might have been a premature performance optimization. I cannot reproduce
any slowdown with this patch.
llvm-svn: 222758
Viktor Kutuzov [Tue, 25 Nov 2014 13:08:02 +0000 (13:08 +0000)]
[Sanitizers] Intercept __tls_get_addr() and shmctl() on FreeBSD
Differential Revision: http://reviews.llvm.org/D6384
llvm-svn: 222757
Viktor Kutuzov [Tue, 25 Nov 2014 13:00:21 +0000 (13:00 +0000)]
[Asan] Pack signal context into a structure
Differential Revision: http://reviews.llvm.org/D6148
llvm-svn: 222756
Daniel Jasper [Tue, 25 Nov 2014 12:32:14 +0000 (12:32 +0000)]
clang-tidy: [misc-use-override] Add testcase with reversed attribute order
llvm-svn: 222755
Tobias Grosser [Tue, 25 Nov 2014 10:51:12 +0000 (10:51 +0000)]
Assume GetElementPtr offsets to be inbounds
In case a GEP instruction references into a fixed size array e.g., an access
A[i][j] into an array A[100x100], LLVM-IR does not guarantee that the subscripts
always compute values that are within array bounds. We now derive the set of
parameter values for which all accesses are within bounds and add the assumption
that the scop is only every executed with this set of parameter values.
Example:
void foo(float A[][20], long n, long m {
for (long i = 0; i < n; i++)
for (long j = 0; j < m; j++)
A[i][j] = ...
This loop yields out-of-bound accesses if m is at least 20 and at the same time
at least one iteration of the outer loop is executed. Hence, we assume:
n <= 0 or m <= 20.
Doing so simplifies the dependence analysis problem, allows us to perform
more optimizations and generate better code.
TODO: The location where the GEP instruction is executed is not necessarily the
location where the memory is actually accessed. As a result scanning for GEP[s]
is imprecise. Even though this is not a correctness problem, this imprecision
may result in missed optimizations or non-optimal run-time checks.
In polybench where this mismatch between parametric loop bounds and fixed size
arrays is common, we see with this patch significant reductions in compile time
(up to 50%) and execution time (up to 70%). We see two significant compile time
regressions (fdtd-2d, jacobi-2d-imper), and one execution time regression
(trmm). Both regressions arise due to additional optimizations that have been
enabled by this patch. They can be addressed in subsequent commits.
http://reviews.llvm.org/D6369
llvm-svn: 222754
Chandler Carruth [Tue, 25 Nov 2014 10:50:41 +0000 (10:50 +0000)]
Revert r222746: That commit did not update any tests and caused two R600
tests to start failing.
Original commit log: R600/SI: Disable commutativity for MIN/MAX_LEGACY
llvm-svn: 222753
Zoran Jovanovic [Tue, 25 Nov 2014 10:50:00 +0000 (10:50 +0000)]
[mips][micromips] Use call instructions with short delay slots
Differential Revision: http://reviews.llvm.org/D6338
llvm-svn: 222752
Daniel Jasper [Tue, 25 Nov 2014 10:45:23 +0000 (10:45 +0000)]
clang-tidy: Add override before the first attribute.
Apparently attributes aren't sorted by source location.
llvm-svn: 222751
Hafiz Abid Qadeer [Tue, 25 Nov 2014 10:41:57 +0000 (10:41 +0000)]
Add initial lldb-mi tests.
Test 'test_lldbmi_interrupt' is only enabled for Darwin as
it seems to cause a timeout error on Linux.
Patch from dawn@burble.org.
llvm-svn: 222750
Chandler Carruth [Tue, 25 Nov 2014 10:10:37 +0000 (10:10 +0000)]
Update Clang tests that run the LLVM optimizer to reflect the changed
canonicalization in r222748. No interesting functionality changed here.
llvm-svn: 222749
Chandler Carruth [Tue, 25 Nov 2014 10:09:51 +0000 (10:09 +0000)]
[InstCombine] Change LLVM To canonicalize toward the value type being
stored rather than the pointer type.
This change is analogous to r220138 which changed the canonicalization
for loads. The rationale is the same: memory does not have a type,
operations (and thus the values they produce) have a type. We should
match that type as closely as possible rather than reading some form of
semantics into the pointer type.
With this change, loads and stores should no longer be made with
nonsensical types for the values that tehy load and store. This is
particularly important when trying to match specific loaded and stored
types in the process of doing other instcombines, which is what led me
down this twisty maze of miscanonicalization.
I've put quite some effort into looking through IR to find places where
LLVM's optimizer was being unreasonably conservative in the face of
mismatched load and store types, however it is possible (let's say,
likely!) I have missed some. If you see regressions here, or from
r220138, the likely cause is some part of LLVM failing to cope with load
and store types differing. Test cases appreciated, it is important that
we root all of these out of LLVM.
llvm-svn: 222748
Daniel Jasper [Tue, 25 Nov 2014 10:05:17 +0000 (10:05 +0000)]
clang-format: Refactoring.
Re-apply r222638 and r222641 without variadic templates.
llvm-svn: 222747
Marek Olsak [Tue, 25 Nov 2014 09:49:23 +0000 (09:49 +0000)]
R600/SI: Disable commutativity for MIN/MAX_LEGACY
llvm-svn: 222746
Daniel Jasper [Tue, 25 Nov 2014 09:45:48 +0000 (09:45 +0000)]
Add flag -f(no-)modules-implicit-maps.
This suppresses the implicit search for files called 'module.modulemap' and
similar.
llvm-svn: 222745
Charlie Turner [Tue, 25 Nov 2014 09:30:09 +0000 (09:30 +0000)]
Correctly handle Tag_CPU_arch_profile.
Fix ARMAttributeParser::CPU_arch_profile so that it doesn't switch on the value
'0' as a legal value of this build attribute.
Change-Id: Ie05a08900a82bb10b78c841b437df747ce3bb38e
llvm-svn: 222743
Chandler Carruth [Tue, 25 Nov 2014 08:59:34 +0000 (08:59 +0000)]
Add a missing override, caught by clang's inconsistent override warning.
llvm-svn: 222742
Sergey Dmitrouk [Tue, 25 Nov 2014 08:57:36 +0000 (08:57 +0000)]
[ARM] Define __ARM_FEATURE_DSP macro for CPUs that have DSP instructions
Summary:
This resolves [[ http://llvm.org/bugs/show_bug.cgi?id=17391 | PR17391 ]].
GCC's sources were used as a guide (couldn't find much information in ARM documentation).
Reviewers: doug.gregor, asl
Reviewed By: asl
Subscribers: asl, aemerson, cfe-commits
Differential Revision: http://reviews.llvm.org/D6339
llvm-svn: 222741
Suyog Sarda [Tue, 25 Nov 2014 08:44:56 +0000 (08:44 +0000)]
Change the test case file to use FileCheck instead of grep. NFC.
Change by Ankur Garg.
Differential Revision: http://reviews.llvm.org/D6382
llvm-svn: 222740
Chandler Carruth [Tue, 25 Nov 2014 08:20:27 +0000 (08:20 +0000)]
Revert r220349 to re-instate r220277 with a fix for PR21330 -- quite
clearly only exactly equal width ptrtoint and inttoptr casts are no-op
casts, it says so right there in the langref. Make the code agree.
Original log from r220277:
Teach the load analysis to allow finding available values which require
inttoptr or ptrtoint cast provided there is datalayout available.
Eventually, the datalayout can just be required but in practice it will
always be there today.
To go with the ability to expose available values requiring a ptrtoint
or inttoptr cast, helpers are added to perform one of these three casts.
These smarts are necessary to finish canonicalizing loads and stores to
the operational type requirements without regressing fundamental
combines.
I've added some test cases. These should actually improve as the load
combining and store combining improves, but they may fundamentally be
highlighting some missing combines for select in addition to exercising
the specific added logic to load analysis.
llvm-svn: 222739
Jay Foad [Tue, 25 Nov 2014 07:56:04 +0000 (07:56 +0000)]
[ASan] Fix leak tests on 64-bit targets other than x86-64 (take two)
Summary:
First, remove lit configuration that sets ASAN_OPTIONS to detect_leaks=1
because this is already the default when leak detection is supported.
This removes a bit of duplication between various lit.cfg files.
Second, add a new feature 'leak-detection' if we're targetting x86_64
(not i386) on Linux.
Third, change a couple of tests that need leak detection to require the
new 'leak-detection' feature.
Reviewers: kcc, earthdok, samsonov
Reviewed By: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6396
llvm-svn: 222738
Matt Arsenault [Tue, 25 Nov 2014 07:53:06 +0000 (07:53 +0000)]
R600/SI: Fix allocating flat_scr_lo / flat_scr_hi
Only the super register flat_scr was marked as reserved,
so in some cases with high register usage it would still
try to allocate the subregisters.
llvm-svn: 222737
David Majnemer [Tue, 25 Nov 2014 07:45:56 +0000 (07:45 +0000)]
Forgot to add a file for r222734
llvm-svn: 222736
David Majnemer [Tue, 25 Nov 2014 07:43:14 +0000 (07:43 +0000)]
COFF: Add back an assertion that is superseded by r222124
llvm-svn: 222735
David Majnemer [Tue, 25 Nov 2014 07:42:36 +0000 (07:42 +0000)]
COFF: Add another test for r222124
llvm-svn: 222734
David Majnemer [Tue, 25 Nov 2014 07:20:20 +0000 (07:20 +0000)]
MS ABI: Add CodeGen support for rethrowing MS C++ exceptions
Rethrowing exceptions in the MS model is very simple: just call
_CxxThrowException with nullptr for both arguments.
N.B. They chose stdcall as the calling convention for x86 but cdecl for
all other platforms.
llvm-svn: 222733
Yury Gribov [Tue, 25 Nov 2014 07:10:30 +0000 (07:10 +0000)]
[asan] Improvements for asan deactivated mode: disable asan activation for runtime library on Linux, disable malloc checks.
Reviewed in http://reviews.llvm.org/D6265
llvm-svn: 222732
David Majnemer [Tue, 25 Nov 2014 06:59:35 +0000 (06:59 +0000)]
docs: Update the MSVCCompatibility doc for changes to debug info
The document should reflect that we now support emission for DWARF.
llvm-svn: 222731
Rafael Espindola [Tue, 25 Nov 2014 06:16:27 +0000 (06:16 +0000)]
Use a range loop. NFC.
llvm-svn: 222730
Rafael Espindola [Tue, 25 Nov 2014 06:11:24 +0000 (06:11 +0000)]
Style fix: don't indent inside a namemespace.
llvm-svn: 222729
Rafael Espindola [Tue, 25 Nov 2014 06:07:51 +0000 (06:07 +0000)]
Remove a nested anonymous namespace.
llvm-svn: 222728
Rafael Espindola [Tue, 25 Nov 2014 05:59:24 +0000 (05:59 +0000)]
Fix overly aggressive type merging.
If we find out that two types are *not* isomorphic, we learn nothing about
opaque sub types in both the source and destination.
llvm-svn: 222727
Simon Atanasyan [Tue, 25 Nov 2014 05:57:55 +0000 (05:57 +0000)]
[Object][Mips] Return address of MIPS symbol with cleared microMIPS indicator bit
llvm-svn: 222726
Rafael Espindola [Tue, 25 Nov 2014 04:43:59 +0000 (04:43 +0000)]
Link the type of aliases.
They are not more or less "well typed" than GlobalVariables.
llvm-svn: 222725
Rafael Espindola [Tue, 25 Nov 2014 04:28:31 +0000 (04:28 +0000)]
Don't repeat name in comment or duplicate comment. NFC.
llvm-svn: 222724
Rafael Espindola [Tue, 25 Nov 2014 04:26:19 +0000 (04:26 +0000)]
Use range loops. NFC.
llvm-svn: 222723
Juergen Ributzka [Tue, 25 Nov 2014 04:16:15 +0000 (04:16 +0000)]
[FastISel][AArch64] Fix and extend the tbz/tbnz pattern matching.
The pattern matching failed to recognize all instances of "-1", because when
comparing against "-1" we didn't use an APInt of the same bitwidth.
This commit fixes this and also adds inverse versions of the conditon to catch
more cases.
llvm-svn: 222722
Saleem Abdulrasool [Tue, 25 Nov 2014 03:49:50 +0000 (03:49 +0000)]
CodeGen: further simplify assertion
Use more of algorithm to simplify the assertion. Pointed out by David Blakie!
llvm-svn: 222721
Rafael Espindola [Tue, 25 Nov 2014 03:47:57 +0000 (03:47 +0000)]
Add an interesting test that we already get right. NFC.
llvm-svn: 222720
Eric Fiselier [Tue, 25 Nov 2014 03:19:02 +0000 (03:19 +0000)]
Fix comment on end of #endif to match #if
llvm-svn: 222719
Eric Fiselier [Tue, 25 Nov 2014 03:06:31 +0000 (03:06 +0000)]
Use lit.util.executeCommand instead of our own version
llvm-svn: 222718
Eric Fiselier [Tue, 25 Nov 2014 03:03:32 +0000 (03:03 +0000)]
Use lit.util.executeCommand instead of our own version
llvm-svn: 222717
David Majnemer [Tue, 25 Nov 2014 02:55:48 +0000 (02:55 +0000)]
InstSimplify: Handle some simple tautological comparisons
This handles cases where we are comparing a masked value against itself.
The analysis could be further improved by making it recursive but such
expense is not currently justified.
llvm-svn: 222716
David Blaikie [Tue, 25 Nov 2014 02:26:22 +0000 (02:26 +0000)]
Revert "unique_ptrify LLVMContextImpl::CAZConstants"
Missed the complexities of how these elements are destroyed.
This reverts commit r222714.
llvm-svn: 222715
David Blaikie [Tue, 25 Nov 2014 02:13:54 +0000 (02:13 +0000)]
unique_ptrify LLVMContextImpl::CAZConstants
llvm-svn: 222714
Hal Finkel [Tue, 25 Nov 2014 00:30:11 +0000 (00:30 +0000)]
[PowerPC] Add the 'attn' instruction
The attn instruction is not part of the Power ISA, but is documented in the A2
user manual, and is accepted by the GNU assembler for the A2 and the POWER4+.
Reported as part of PR21650.
llvm-svn: 222712
Eric Fiselier [Mon, 24 Nov 2014 23:46:42 +0000 (23:46 +0000)]
Print lit configuration information after all configuration is done.
llvm-svn: 222711
Hal Finkel [Mon, 24 Nov 2014 23:45:21 +0000 (23:45 +0000)]
[PowerPC] Implement combineRepeatedFPDivisors
This does not matter on newer cores (where we can use reciprocal estimates in
fast-math mode anyway), but for older cores this allows us to generate better
fast-math code where we have multiple FDIVs with a common divisor.
llvm-svn: 222710
Philip Reames [Mon, 24 Nov 2014 23:44:28 +0000 (23:44 +0000)]
Factor check for the assume intrinsic out of checks in computeKnownBitsFromAssume
We were matching against the assume intrinsic in every check. Since we know that it must be an assume, this is just wasted work. Somewhat surprisingly, matching an intrinsic id is actually relatively expensive. It devolves to a string construction and comparison in Function::isIntrinsic.
I originally spotted this because it showed up in a performance profile of my compiler. I've since discovered a separate issue which seems to be the actual root cause, but this is minor perf goodness regardless.
I'm likely to follow up with another change to factor out the comparison matching. There's no need to match the compare instruction in every single one of the tests.
Differential Revision: http://reviews.llvm.org/D6312
llvm-svn: 222709
Paul Robinson [Mon, 24 Nov 2014 23:30:12 +0000 (23:30 +0000)]
See if this fixes Mips bot; ignore contents of parameter lists.
llvm-svn: 222708
Philip Reames [Mon, 24 Nov 2014 23:24:24 +0000 (23:24 +0000)]
Incorporate review comments from r221742
This change implements the comment and style changes Sean requested during post commit review with r221742. Sorry for the delay.
llvm-svn: 222707
Matt Arsenault [Mon, 24 Nov 2014 23:15:18 +0000 (23:15 +0000)]
Bug 21610: Canonicalize min/max fcmp selects to use ordered comparisons
llvm-svn: 222705
Matt Arsenault [Mon, 24 Nov 2014 23:03:17 +0000 (23:03 +0000)]
Convert test to FileCheck and use CHECK-LABEL
llvm-svn: 222704
Eric Fiselier [Mon, 24 Nov 2014 22:42:03 +0000 (22:42 +0000)]
[libcxxabi] Refactor building and testing libc++abi without threads
Summary:
This patch adds CMake support for building and testing libc++abi without threads.
1. Add `LIBCXXABI_ENABLE_THREADS` option to CMake.
2. Propagate `LIBCXXABI_ENABLE_THREADS` to lit via lit.site.cfg.in
3. Configure tests for `LIBCXXABI_ENABLE_THREADS=OFF
Currently the test suite does not work when libc++abi is built without threads because that information does not propagate to the test suite.
Reviewers: danalbert, mclow.lists, jroelofs
Reviewed By: jroelofs
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6393
llvm-svn: 222702
Eric Fiselier [Mon, 24 Nov 2014 22:38:57 +0000 (22:38 +0000)]
[libcxxabi] Refactor test timing logic and disable by default.
Summary:
When using LIT the timing output is entirely unused but introduces a dependency on `<chrono>`. When libc++ is built without a montonic clock this causes some of the tests to fail.
This patch factors out all of the timing logic into `support/timer.hpp` and disables it by default. To enable the timing you must define `LIBCXXABI_TIME_TESTS`.
Reviewers: mclow.lists, danalbert, jroelofs
Reviewed By: jroelofs
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6391
llvm-svn: 222701
Philip Reames [Mon, 24 Nov 2014 22:32:43 +0000 (22:32 +0000)]
Clarify wording in the LangRef around !invariant.load
Clarify the wording around !invariant.load to properly reflect the semantics of such loads with respect to control dependence and location lifetime. To the best of my knowledge, the revised wording respects the actual implementation and understanding of issues involved highlighted in the recent 'Optimization hints for "constant" loads' thread on LLVMDev.
In particular, I'm aiming for the following results:
- To clarify that an invariant.load can fault and must respect control dependence. In particular, it is not sound to unconditionally pull an invariant load out of a loop if that loop would potentially never execute.
- To clarify that the invariant nature of a given pointer does not preclude the modification of that location through a pointer which is unrelated to the load operand. In particular, initializing a location and then passing a pointer through an opaque intrinsic which produces a new unrelated pointer, should behave as expected provided that the intrinsic is memory dependent on the initializing store.
- To clarify that storing a value to an invariant location is defined. It can not, for example, be considered unreachable. The value stored can be assumed to be equal to the value of any previous (or following!) invariant load, but the store itself is defined.
I recommend that anyone interested in using !invariant.load, or optimizing for them, read over the discussion in the review thread. A number of motivating examples are discussed.
Differential Revision: http://reviews.llvm.org/D6346
llvm-svn: 222700
Alexey Samsonov [Mon, 24 Nov 2014 22:27:34 +0000 (22:27 +0000)]
[TSan] Deflake test
llvm-svn: 222699
Dan Albert [Mon, 24 Nov 2014 22:24:06 +0000 (22:24 +0000)]
Add better support for custom test runners.
Summary:
I finally got around to merging the many, many changes to lit.cfg into
Android's libc++. This patch makes it simpler to actually use a custom
configuration and test format.
First, I've factored out _build, _run, and _clean methods from
_execute_test, since these are the likely parts that will need to be
overridden. This is likely a first step in the work jroelofs has been
doing with improving cross-compiling test execution.
Second, I've added a `configuration_variant` to the config. This
entry, if present, is a string that forms the prefix of the class that
is to be used to configure the test runner. For example, Android sets
`config.configuration_variant = 'Android'`, and this causes an object
of type `AndroidConfiguration` to be constructed.
As an example of how this will be used, see:
https://android-review.googlesource.com/#/c/116022/
Reviewers: jroelofs, mclow.lists, EricWF
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6373
llvm-svn: 222698
Reid Kleckner [Mon, 24 Nov 2014 22:05:42 +0000 (22:05 +0000)]
Remove unnecessary environment switch
All supported environments on x86 Windows return structs in EAX:EDX.
This removes code added in r204978 that had to get updated in r222680.
We should now have the same behavior we had before r204978.
llvm-svn: 222697
Kaelyn Takata [Mon, 24 Nov 2014 21:46:59 +0000 (21:46 +0000)]
Force the correction of delayed typos in casts in non-C++ code.
Fixes PR21656, which is fallout from r222551 caused by an untested/missed
code path.
llvm-svn: 222694
Samuel Benzaquen [Mon, 24 Nov 2014 21:21:09 +0000 (21:21 +0000)]
Filter the toplevel matchers by kind.
Summary:
Filter the toplevel matchers by kind.
Decl and Stmt matchers are tied to a specific node kind and trying to
match incompatible nodes is a waste.
Precalculate a filtered list of matchers that have a chance of matching
the node and ignore the rest.
Speeds up our clang-tidy benchmark by ~10%
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6361
llvm-svn: 222688
Rafael Espindola [Mon, 24 Nov 2014 21:18:14 +0000 (21:18 +0000)]
Add a disable-output option to the gold plugin.
This corresponds to the opt option and is handy for profiling.
llvm-svn: 222687
Tim Northover [Mon, 24 Nov 2014 21:03:34 +0000 (21:03 +0000)]
testing: make test use FileCheck
The "grep internal | count" was fragile when your source or remote paths could
contain the word "internal".
llvm-svn: 222685
Rafael Espindola [Mon, 24 Nov 2014 20:53:26 +0000 (20:53 +0000)]
Remove the unused FindUsedTypes pass.
It was dead since r134829.
llvm-svn: 222684
Paul Robinson [Mon, 24 Nov 2014 20:51:42 +0000 (20:51 +0000)]
Correctly remove OptimizeForSize from functions marked OptimizeNone.
This allows using __attribute__((optnone)) and the -Os/-Oz options.
Fixes PR21604.
llvm-svn: 222683
Rafael Espindola [Mon, 24 Nov 2014 20:44:36 +0000 (20:44 +0000)]
Add and use Type::subtypes. NFC.
llvm-svn: 222682
Rafael Espindola [Mon, 24 Nov 2014 20:35:59 +0000 (20:35 +0000)]
Pass the .ll files to llvm-link directly. NFC.
llvm-svn: 222681
Saleem Abdulrasool [Mon, 24 Nov 2014 20:14:29 +0000 (20:14 +0000)]
CodeGen: make i686-windows-itanium more similar to msvc
The itanium environment follows the system calling convention for structures.
Pass small aggregates via registers.
llvm-svn: 222680
Saleem Abdulrasool [Mon, 24 Nov 2014 20:14:26 +0000 (20:14 +0000)]
CodeGen: use a range-based for loop
Convert a debug assertion into a range-based loop form. NFC.
llvm-svn: 222679
Sergey Dmitrouk [Mon, 24 Nov 2014 19:40:07 +0000 (19:40 +0000)]
Correct path to regression tests in ExtendingLLVM
llvm-svn: 222678
Chad Rosier [Mon, 24 Nov 2014 18:57:58 +0000 (18:57 +0000)]
[AArch64] Fix clobber computation in A57LoadBalancing pass.
Extremely difficult to reproduce, so no test case included.
PR21637
llvm-svn: 222677
Colin LeMahieu [Mon, 24 Nov 2014 18:55:32 +0000 (18:55 +0000)]
Removing unused variable.
llvm-svn: 222676
Kostya Serebryany [Mon, 24 Nov 2014 18:49:53 +0000 (18:49 +0000)]
[asan/coverage] change the way asan coverage instrumentation is done: instead of setting the guard to 1 in the generated code, pass the pointer to guard to __sanitizer_cov and set it there. No user-visible functionality change expected
llvm-svn: 222675
Eric Fiselier [Mon, 24 Nov 2014 18:46:37 +0000 (18:46 +0000)]
[libcxxabi] Delay adjustment of pointer to prevent referencing invalid memory.
Summary:
This patch delays the dereference adjustment until we are sure the thrown type is a pointer type. It is possible the thrown type is not a pointer and is smaller than `sizeof(void*)`. If the thrown type is is smaller than `sizeof(void*)` the deference adjustment will result in a heap buffer overflow.
I audited all the call sites of `can_catch(...)` and there are no places where `adjustedPtr` is used if `can_catch(...)` returns false. For this reason the patch should not introduce any functionality change.
This patch fixes the following tests when using ASAN:
* unwind_01.cpp
* unwind_02.cpp
* unwind_04.cpp
Reviewers: danalbert, jroelofs, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6353
llvm-svn: 222674
Eric Fiselier [Mon, 24 Nov 2014 18:17:04 +0000 (18:17 +0000)]
[compiler-rt] Make the MSAN wmemset intercepter call wmemset instead of memset. Fixes PR 21579
Summary:
Exactly what the title says. I've tested this change against the libc++ test failures and it solves all of them. The check-msan rule also still passes.
I'm not sure why it called memset originally.
I can add tests if requested but currently there are no tests involving wide chars and they are a c++11 features.
Reviewers: kcc, eugenis
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6352
llvm-svn: 222673
Ulrich Weigand [Mon, 24 Nov 2014 18:09:47 +0000 (18:09 +0000)]
[PowerPC] Fix PR 21652 - copy st_other bits on symbol assignment
When processing an assignment in the integrated assembler that sets
a symbol to the value of another symbol, we need to copy the st_other
bits that encode the local entry point offset.
Modeled after MipsTargetELFStreamer::emitAssignment handling of the
ELF::STO_MIPS_MICROMIPS flag.
llvm-svn: 222672
Paul Robinson [Mon, 24 Nov 2014 18:05:29 +0000 (18:05 +0000)]
More long path name support on Windows, this time in program execution.
Allows long paths for the executable and redirected stdin/stdout/stderr.
Addresses PR21563.
llvm-svn: 222671
Colin LeMahieu [Mon, 24 Nov 2014 18:04:42 +0000 (18:04 +0000)]
[Hexagon] Adding asrh instruction, removing unused multiclasses.
llvm-svn: 222670
Colin LeMahieu [Mon, 24 Nov 2014 17:44:19 +0000 (17:44 +0000)]
[Hexagon] Adding aslh instruction.
llvm-svn: 222668
Aaron Ballman [Mon, 24 Nov 2014 17:39:44 +0000 (17:39 +0000)]
Reverting r222646; the tests do not pass on Windows. Also reverts r222664, which was required for r222646 to compile with Visual Studio 2012.
llvm-svn: 222667
Nico Rieck [Mon, 24 Nov 2014 17:29:52 +0000 (17:29 +0000)]
Fix line endings
llvm-svn: 222666
Nico Rieck [Mon, 24 Nov 2014 17:29:35 +0000 (17:29 +0000)]
Fix crash when using __if_exists in C mode
llvm-svn: 222665
Aaron Ballman [Mon, 24 Nov 2014 17:22:32 +0000 (17:22 +0000)]
Unbreaking the MSVC 2012 build; however, these tests still fail on Windows.
llvm-svn: 222664
Colin LeMahieu [Mon, 24 Nov 2014 17:11:34 +0000 (17:11 +0000)]
[Hexagon] Adding zxth instruction.
llvm-svn: 222662
Colin LeMahieu [Mon, 24 Nov 2014 16:50:40 +0000 (16:50 +0000)]
Adding const iterator to MCInst. reviews.llvm.org/D6359
llvm-svn: 222661
Colin LeMahieu [Mon, 24 Nov 2014 16:48:43 +0000 (16:48 +0000)]
[Hexagon] Adding zxtb instruction.
llvm-svn: 222660
David Majnemer [Mon, 24 Nov 2014 16:41:13 +0000 (16:41 +0000)]
InstCombine: Don't create an unused instruction
We would create an instruction but not inserting it.
Not inserting the unused instruction would lead us to verification
failure.
This fixes PR21653.
llvm-svn: 222659
Jozef Kolek [Mon, 24 Nov 2014 16:14:10 +0000 (16:14 +0000)]
[mips][microMIPS] Fix JRADDIUSP instruction
Fix JRADDIUSP instruction, remove delay slot flag because this instruction
doesn't have delay slot.
Differential Revision: http://reviews.llvm.org/D6365
llvm-svn: 222658
Aaron Ballman [Mon, 24 Nov 2014 15:42:34 +0000 (15:42 +0000)]
Reverting r222638; it broke the MSVC build bots because Visual Studio 2012 does not support variadic templates. Also reverting r222641 because it was relying on 222638.
llvm-svn: 222656
Ed Maste [Mon, 24 Nov 2014 15:01:11 +0000 (15:01 +0000)]
Fix lldb(1) man page formatting
- Use canonical date order (per groff & mandoc)
- Fix capitalization on one .Nm
- Remove EOL whitespace
Patch by Baptiste Daroussin in FreeBSD svn r274927.
llvm-svn: 222655