Commit Graph

226436 Commits

Author SHA1 Message Date
Matthias Braun 8d41436004 CodeGen: Factor out code for tail call result compatibility check; NFC
llvm-svn: 264959
2016-03-30 22:46:04 +00:00
Matthias Braun 99ce7ccf32 Avoid unnecessary #include; NFC
llvm-svn: 264958
2016-03-30 22:45:58 +00:00
Enrico Granata b64d3d61e3 Enhance the 'type X list' commands such that they actually alert the user if no formatters matching the constraints could be found
llvm-svn: 264957
2016-03-30 22:45:13 +00:00
Simon Atanasyan cf8c42f546 [ELF][MIPS] Revert r264761 and add test case to demonstrate the problem
If we make R_MIPS_LO16 a relative relocation, linker:
- never creates R_MIPS_COPY relocation for it
- attempts to create R_MIPS_REL32 dynamic relocation if R_MIPS_LO16's
  target is a preemptible symbol

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

llvm-svn: 264956
2016-03-30 22:43:14 +00:00
Paul Robinson a7e5210eec Update copyright year to 2016.
llvm-svn: 264955
2016-03-30 22:41:38 +00:00
Paul Robinson 3d5100958f Update copyright year to 2016.
llvm-svn: 264954
2016-03-30 22:41:06 +00:00
Paul Robinson 56a97912cb Update copyright year to 2016.
llvm-svn: 264953
2016-03-30 22:40:59 +00:00
Paul Robinson d74e849270 Update copyright year to 2016.
llvm-svn: 264952
2016-03-30 22:40:47 +00:00
Rui Ueyama 1e0f022f05 Fix -Wpessimizing-move warnings.
llvm-svn: 264951
2016-03-30 22:40:16 +00:00
Paul Robinson 9039bf0bc8 Update copyright year to 2016.
llvm-svn: 264950
2016-03-30 22:39:53 +00:00
Paul Robinson 36a6eaeb34 Update copyright year to 2016.
llvm-svn: 264949
2016-03-30 22:39:03 +00:00
Paul Robinson d993522d28 Update copyright year to 2016.
llvm-svn: 264948
2016-03-30 22:38:50 +00:00
Paul Robinson ac6b1ce21a Update copyright year to 2016.
llvm-svn: 264947
2016-03-30 22:38:47 +00:00
Paul Robinson 55771cd7be Update copyright year to 2016.
llvm-svn: 264946
2016-03-30 22:38:44 +00:00
Pete Cooper 63d1aba2ce Remove useless unreachable. Switch coverage already gives us this. NFC
llvm-svn: 264945
2016-03-30 22:34:37 +00:00
Matt Arsenault 2fe4fbc184 AMDGPU: Add frexp_exp intrinsic
llvm-svn: 264944
2016-03-30 22:28:52 +00:00
Matt Arsenault 5cd4f8f89f AMDGPU: Constant folding for frexp_mant
llvm-svn: 264943
2016-03-30 22:28:26 +00:00
Paul Robinson a8305830db Docs: keep copyright years up-to-date.
llvm-svn: 264942
2016-03-30 22:25:04 +00:00
Paul Robinson 1c898c9e8c Docs: keep copyright years up-to-date.
llvm-svn: 264941
2016-03-30 22:24:57 +00:00
Richard Trieu a7564d7d66 Fix Clang crash with template type diffing.
Fixes https://llvm.org/bugs/show_bug.cgi?id=27129 which is crash involving type
aliases and template type diffing.  Template arguments for type aliases and
template arguments for the underlying desugared type may not have one-to-one
relations, which could mess us the attempt to get more information from the
desugared type.  For type aliases, ignore the iterator over the desugared type.

llvm-svn: 264940
2016-03-30 22:23:00 +00:00
Vassil Vassilev 85daf65c5a Add -emit-llvm-only to the regression test for PR21547.
llvm-svn: 264939
2016-03-30 22:22:50 +00:00
Ryan Govostes e0f41da049 [asan] Mark the initialization-bug.cc unsupported on OS X Yosemite and older
This test should fail on OS X Yosemite and older, and pass on OS X El Capitan
and newer as well as on other platforms.

llvm-svn: 264938
2016-03-30 22:21:58 +00:00
Vassil Vassilev bab6f96fff Canonicalize UnaryTransformType types when they don't have a known underlying type.
Fixes https://llvm.org/bugs/show_bug.cgi?id=26014

Reviewed by Richard Smith.

llvm-svn: 264937
2016-03-30 22:18:29 +00:00
Teresa Johnson d8d94652b2 Use existing PrintEscapedString in AssemblyWriter
r264884 introduced a helper to escape the backslashes in the source file
path, but I since discovered an existing mechanism to escape strings.

llvm-svn: 264936
2016-03-30 22:17:28 +00:00
Peter Collingbourne 2bc252acd5 Cloning: Reduce complexity of debug info cloning and fix correctness issue.
Commit r260791 contained an error in that it would introduce a cross-module
reference in the old module. It also introduced O(N^2) complexity in the
module cloner by requiring the entire module to be visited for each function.
Fix both of these problems by avoiding use of the CloneDebugInfoMetadata
function (which is only designed to do intra-module cloning) and cloning
function-attached metadata in the same way that we clone all other metadata.

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

llvm-svn: 264935
2016-03-30 22:05:13 +00:00
Jonathan Peyton 1d46d979a9 Fix bug when KMP_USE_ADAPTIVE_LOCKS is 0
#endif was one line too low.  If KMP_USE_ADAPTIVE_LOCKS is 0,
then queuing locks would incorrectly use drdpa lock mechanism.
This is a fix for https://llvm.org/bugs/show_bug.cgi?id=26649

llvm-svn: 264934
2016-03-30 21:50:59 +00:00
Sanjay Patel 43d4144d0d fix typos
llvm-svn: 264933
2016-03-30 21:38:20 +00:00
Aaron Ballman abd466ed04 Silencing warnings from MSVC 2015 Update 2. Both of these changes silence "C4334 '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)". NFC.
llvm-svn: 264932
2016-03-30 21:33:34 +00:00
Matt Arsenault edc7c6b237 AMDGPU: Remove separate r600 double data layout
This is identical to the other r600 datalayout string.

llvm-svn: 264931
2016-03-30 21:32:37 +00:00
Oleg Ranevskyy b88d2474df [Clang][ARM] __va_list declaration is not saved in ASTContext causing compilation error or crash
Summary:
When the code is compiled for arm32 and the builtin `__va_list` declaration is created by `CreateAAPCSABIBuiltinVaListDecl`, the declaration is not saved in the `ASTContext` which may lead to a compilation error or crash.

Minimal reproducer I was able to find:
**header.h**
```
#include <stdarg.h>
typedef va_list va_list_1;
```

**test.cpp**
```
typedef __builtin_va_list va_list_2;
void foo(const char* format, ...) { va_list args; va_start( args, format ); }
```

Steps to reproduce:
```
clang -x c++-header --target=armv7l-linux-eabihf header.h
clang -c -include header.h --target=armv7l-linux-eabihf test.cpp
```

Compilation error:
```
error: non-const lvalue reference to type '__builtin_va_list'
      cannot bind to a value of unrelated type 'va_list' (aka '__builtin_va_list')
```

Compiling the same code as a C source leads to a crash:
```
clang --target=armv7l-linux-eabihf header.h
clang -c -x c -include header.h --target=armv7l-linux-eabihf test.cpp
```

Reviewers: logan, rsmith

Subscribers: cfe-commits, asl, aemerson, rengolin

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

llvm-svn: 264930
2016-03-30 21:30:30 +00:00
Aaron Ballman ef0fe1eed8 Silencing warnings from MSVC 2015 Update 2. All of these changes silence "C4334 '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)". NFC.
llvm-svn: 264929
2016-03-30 21:30:00 +00:00
Matt Arsenault 46ba31650e LegalizeDAG: Don't replace vector store with integer if not legal
For the same reason as the corresponding load change.

Note that ExpandStore is completely broken for non-byte sized element
vector stores, but preserve the current broken behavior which has tests
for it. The behavior should be the same, but now introduces a new typed
store that is incorrectly split later rather than doing it directly.

llvm-svn: 264928
2016-03-30 21:15:18 +00:00
Matt Arsenault a4b1b6ea05 LegalizeDAG: Don't replace vector load with integer unless legal
On AMDGPU we want to be able to promote i64/f64 loads to v2i32.
If the access is unaligned, this would conclude that since i64 is legal,
it would convert it back to i64 and there is an endless legalization
loop.

Extract the logic for scalarizing the load into a new TargetLowering
function, where this can also replace the custom function AMDGPU
has for this.

llvm-svn: 264927
2016-03-30 21:15:10 +00:00
David Majnemer 5d518386b6 [IndVarSimplify] Don't insert after a catchswitch
Widening a PHI requires us to insert a trunc.
The logical place for this trunc is in the same BB as the PHI.
This is not possible if the BB is terminated by a catchswitch.

This fixes PR27133.

llvm-svn: 264926
2016-03-30 21:12:06 +00:00
Davide Italiano bbaf5e0acf [LTO] Add a test to ensure we treat externally available symbols correctly.
We already get it right, but there was no coverage for it.

llvm-svn: 264925
2016-03-30 21:01:14 +00:00
Pete Cooper 3c40b5b750 Convert file handle* methods to llvm::Error instead of std::error_code. NFC.
This updates most of the file handling methods in the linking context and
resolver to use the new API.

llvm-svn: 264924
2016-03-30 20:56:54 +00:00
Justin Lebar 37529887b7 Add #include <functional> to PassManagerBuilder, now that it uses std::function. NFC
llvm-svn: 264923
2016-03-30 20:52:40 +00:00
Simon Pilgrim c49bd2ede0 [X86][AVX] Ensure EltsFromConsecutiveLoads tests the entire vector for consecutive loads/zeros
Fix for issue introduced D17297, where we were breaking early from the loop detecting consecutive loads which could leave us thinking a consecutive load with zeros was possible.

llvm-svn: 264922
2016-03-30 20:52:24 +00:00
Pete Cooper 96be123198 Change loadFileList to llvm::Error. NFC
llvm-svn: 264921
2016-03-30 20:44:14 +00:00
Justin Lebar 39fd529935 [Sema] s/UseUsingDeclRules/UseMemberUsingDeclRules/
Summary:
IsOverload has a param named UseUsingDeclRules.  But as far as I can
tell, it should be called UseMemberUsingDeclRules.  That is, it only
applies to "using" declarations inside classes or structs.

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 264920
2016-03-30 20:41:05 +00:00
Justin Lebar e3804cc932 [NVPTX] Make NVVMReflect a function pass.
Summary:
Currently it's a module pass.  Make it a function pass so that we can
move it to PassManagerBuilder's EP_EarlyAsPossible extension point,
which only accepts function passes.

Reviewers: rnk

Subscribers: tra, llvm-commits, jholewinski

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

llvm-svn: 264919
2016-03-30 20:40:11 +00:00
Justin Lebar 2fe1323112 [PassManager] Make PassManagerBuilder::addExtension take an std::function, rather than a function pointer.
Summary:
This gives callers flexibility to pass lambdas with captures, which lets
callers avoid the C-style void*-ptr closure style.  (Currently, callers
in clang store state in the PassManagerBuilderBase arg.)

No functional change, and the new API is backwards-compatible.

Reviewers: chandlerc

Subscribers: joker.eph, cfe-commits

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

llvm-svn: 264918
2016-03-30 20:39:29 +00:00
Pete Cooper c73c9d273d Convert lld Pass::runOnFile to llvm::Error from std::error_code. NFC.
Pretty mechanical change here.  Just replacing all the std::error_code() with
llvm::Error() and make_dynamic_error_code with make_error<GenericError>

llvm-svn: 264917
2016-03-30 20:36:31 +00:00
Justin Bogner a5a6378700 test: Remove a test for a transform that hasn't existed in 5 years.
The TailDup transform was removed in r138841 in 2011, along with most
of the tests for it. This test, however, was missed. Probably because
it had already been XFAIL'd for 3 years at that point (since r52243!)
and continued to fail when the opt flag for -tailduplicate stopped
being valid.

llvm-svn: 264916
2016-03-30 20:36:07 +00:00
Rui Ueyama 8dbbb2555b Attempt to fix test failure on Windows.
Windows seems to complain that the file cannot be removed because
it is still in use. We don't have to remove the file but instead
just overwrite it, so do that.

llvm-svn: 264915
2016-03-30 20:25:26 +00:00
Sean Callanan 7326b69de4 Fixed a problem where a dSYM wasn't properly found because it had the wrong name
<rdar://problem/25447765>

llvm-svn: 264914
2016-03-30 20:17:41 +00:00
Vassil Vassilev 262f41e91c [modules] Write out identifiers if the ID is local, too.
In some cases a slot for an identifier is requested but it gets written to
another module, causing an assertion.

At the point when we start serializing Rtypes, we have no imported IdentifierID
for float_round_style. We start serializing stuff and allocate an ID for it.
Then, during the serialization process, we pull in the identifier info for it
from TSchemaHelper. Finally, WriteIdentifierTable decides that the identifier
has not changed since it was deserialized, so doesn't emit it.

Fixes https://llvm.org/bugs/show_bug.cgi?id=27041

Discussed on IRC with Richard Smith. Agreed on post commit review if needed.

llvm-svn: 264913
2016-03-30 20:16:03 +00:00
Reid Kleckner 750e76d245 Fix the detection of the shell feature and disable some tests when its not present
llvm-svn: 264912
2016-03-30 20:15:50 +00:00
Reid Kleckner 4f88914c5b Remove unused fwd decl for LLVM IR stuff that lives in LTO now
llvm-svn: 264911
2016-03-30 20:15:41 +00:00
Pete Cooper 1e00911ee0 Change getReferenceInfo/getPairReferenceInfo to use new Error handling. NFC.
Adds a GenericError class to lld/Core which can carry a string.  This is
analygous to the dynamic_error we currently use in lld/Core.

Use this GenericError instead of make_dynamic_error_code.  Also, provide
an implemention of GenericError::convertToErrorCode which for now converts
it in to the dynamic_error_code we used to have.  This will go away once
all the APIs are converted.

llvm-svn: 264910
2016-03-30 20:15:06 +00:00