Commit Graph

187396 Commits

Author SHA1 Message Date
Charlie Turner c27023c622 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
2014-11-25 09:30:09 +00:00
Chandler Carruth 4b9e85789d Add a missing override, caught by clang's inconsistent override warning.
llvm-svn: 222742
2014-11-25 08:59:34 +00:00
Sergey Dmitrouk 745f530446 [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
2014-11-25 08:57:36 +00:00
Suyog Sarda 99c9c1f2b0 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
2014-11-25 08:44:56 +00:00
Chandler Carruth 1a3c2c414c 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
2014-11-25 08:20:27 +00:00
Jay Foad 0160570a0f [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
2014-11-25 07:56:04 +00:00
Matt Arsenault e335fd343e 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
2014-11-25 07:53:06 +00:00
David Majnemer 8cf0dbb015 Forgot to add a file for r222734
llvm-svn: 222736
2014-11-25 07:45:56 +00:00
David Majnemer c7353b5890 COFF: Add back an assertion that is superseded by r222124
llvm-svn: 222735
2014-11-25 07:43:14 +00:00
David Majnemer 0349a019ca COFF: Add another test for r222124
llvm-svn: 222734
2014-11-25 07:42:36 +00:00
David Majnemer 442d0a2e5a 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
2014-11-25 07:20:20 +00:00
Yury Gribov 4646b11acf [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
2014-11-25 07:10:30 +00:00
David Majnemer 81537b5c8e docs: Update the MSVCCompatibility doc for changes to debug info
The document should reflect that we now support emission for DWARF.

llvm-svn: 222731
2014-11-25 06:59:35 +00:00
Rafael Espindola 8f14471e81 Use a range loop. NFC.
llvm-svn: 222730
2014-11-25 06:16:27 +00:00
Rafael Espindola c84f608b08 Style fix: don't indent inside a namemespace.
llvm-svn: 222729
2014-11-25 06:11:24 +00:00
Rafael Espindola f010311166 Remove a nested anonymous namespace.
llvm-svn: 222728
2014-11-25 06:07:51 +00:00
Rafael Espindola 86911440c2 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
2014-11-25 05:59:24 +00:00
Simon Atanasyan 84f4651f9a [Object][Mips] Return address of MIPS symbol with cleared microMIPS indicator bit
llvm-svn: 222726
2014-11-25 05:57:55 +00:00
Rafael Espindola e96d7eb8bd Link the type of aliases.
They are not more or less "well typed" than GlobalVariables.

llvm-svn: 222725
2014-11-25 04:43:59 +00:00
Rafael Espindola d2a13a2ec6 Don't repeat name in comment or duplicate comment. NFC.
llvm-svn: 222724
2014-11-25 04:28:31 +00:00
Rafael Espindola c8a476ee11 Use range loops. NFC.
llvm-svn: 222723
2014-11-25 04:26:19 +00:00
Juergen Ributzka eb67bd8d74 [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
2014-11-25 04:16:15 +00:00
Saleem Abdulrasool 32d1a96d69 CodeGen: further simplify assertion
Use more of algorithm to simplify the assertion.  Pointed out by David Blakie!

llvm-svn: 222721
2014-11-25 03:49:50 +00:00
Rafael Espindola 27ce577356 Add an interesting test that we already get right. NFC.
llvm-svn: 222720
2014-11-25 03:47:57 +00:00
Eric Fiselier eae1b6a6d7 Fix comment on end of #endif to match #if
llvm-svn: 222719
2014-11-25 03:19:02 +00:00
Eric Fiselier 17b1568fc4 Use lit.util.executeCommand instead of our own version
llvm-svn: 222718
2014-11-25 03:06:31 +00:00
Eric Fiselier e620b5eaa6 Use lit.util.executeCommand instead of our own version
llvm-svn: 222717
2014-11-25 03:03:32 +00:00
David Majnemer bd9ce4ea51 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
2014-11-25 02:55:48 +00:00
David Blaikie cb2818fa76 Revert "unique_ptrify LLVMContextImpl::CAZConstants"
Missed the complexities of how these elements are destroyed.

This reverts commit r222714.

llvm-svn: 222715
2014-11-25 02:26:22 +00:00
David Blaikie 899b85a556 unique_ptrify LLVMContextImpl::CAZConstants
llvm-svn: 222714
2014-11-25 02:13:54 +00:00
Hal Finkel 5901676581 [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
2014-11-25 00:30:11 +00:00
Eric Fiselier cf82c1e904 Print lit configuration information after all configuration is done.
llvm-svn: 222711
2014-11-24 23:46:42 +00:00
Hal Finkel 360f213d03 [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
2014-11-24 23:45:21 +00:00
Philip Reames 00d3b279cb 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
2014-11-24 23:44:28 +00:00
Paul Robinson 4e21001bac See if this fixes Mips bot; ignore contents of parameter lists.
llvm-svn: 222708
2014-11-24 23:30:12 +00:00
Philip Reames 059ecbfb58 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
2014-11-24 23:24:24 +00:00
Matt Arsenault 238ff1ad1e Bug 21610: Canonicalize min/max fcmp selects to use ordered comparisons
llvm-svn: 222705
2014-11-24 23:15:18 +00:00
Matt Arsenault ea515d33c9 Convert test to FileCheck and use CHECK-LABEL
llvm-svn: 222704
2014-11-24 23:03:17 +00:00
Eric Fiselier 559f867af2 [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
2014-11-24 22:42:03 +00:00
Eric Fiselier c5de7b113b [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
2014-11-24 22:38:57 +00:00
Philip Reames e1526fc205 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
2014-11-24 22:32:43 +00:00
Alexey Samsonov 49a040a483 [TSan] Deflake test
llvm-svn: 222699
2014-11-24 22:27:34 +00:00
Dan Albert 86b75a4057 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
2014-11-24 22:24:06 +00:00
Reid Kleckner 2918fefd1c 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
2014-11-24 22:05:42 +00:00
Kaelyn Takata 13da33fdfe 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
2014-11-24 21:46:59 +00:00
Samuel Benzaquen 074bbb698d 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
2014-11-24 21:21:09 +00:00
Rafael Espindola 6953a3a6e0 Add a disable-output option to the gold plugin.
This corresponds to the opt option and is handy for profiling.

llvm-svn: 222687
2014-11-24 21:18:14 +00:00
Tim Northover bdcc1ed66d 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
2014-11-24 21:03:34 +00:00
Rafael Espindola 64ac12d626 Remove the unused FindUsedTypes pass.
It was dead since r134829.

llvm-svn: 222684
2014-11-24 20:53:26 +00:00
Paul Robinson 4ece682586 Correctly remove OptimizeForSize from functions marked OptimizeNone.
This allows using __attribute__((optnone)) and the -Os/-Oz options.
Fixes PR21604.

llvm-svn: 222683
2014-11-24 20:51:42 +00:00