Commit Graph

261541 Commits

Author SHA1 Message Date
Eric Fiselier f7ae14dbb9 Fix remaining GCC 7 build warnings
llvm-svn: 302283
2017-05-05 20:39:03 +00:00
Chris Bieneman 8d0c7fafdb Fix UDP Socket connections
Some of the refactoring in r301492 broke UDP socket connections. This is a partial revert of that refactoring. At some point I'll spend more time diagnosing where the refactoring went wrong and how to better clean up this code, but I don't have time to do that today.

llvm-svn: 302282
2017-05-05 20:35:50 +00:00
Jakub Kuderski f8d872c66e [clang-tidy] Fix PR32896: detect initializer lists in modernize-use-empalce
Summary:
This patch fixes [[ https://bugs.llvm.org/show_bug.cgi?id=32896 | PR32896 ]].

The problem was that modernize-use-emplace incorrectly removed changed push_back into emplace_back, removing explicit constructor call with initializer list parameter, resulting in compiler error after applying fixits.
modernize-use-emplace used to check if matched constructor had InitListExpr, but didn't check against CXXStdInitializerListExpr.

Eg.

```
std::vector<std::vector<int>> v;
  v.push_back(std::vector<int>({1})); // --> v.emplace_back({1});
```

Reviewers: Prazek, alexfh, aaron.ballman

Reviewed By: Prazek, alexfh, aaron.ballman

Subscribers: xazax.hun, cfe-commits

Tags: #clang-tools-extra

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

llvm-svn: 302281
2017-05-05 20:35:30 +00:00
Eric Fiselier 807790a09b Fix new warnings emitted by GCC 7
llvm-svn: 302280
2017-05-05 20:32:26 +00:00
Rafael Espindola 81273c721c Remove isTlsLocalDynamicRel and isTlsInitialExecRel.
This feels a bit hackish, but I think it is still an improvement.

The way a tls address is computed in the various architectures is not
that different. For example, for local dynamic we need the base of the
tls (R_TLSLD or R_TLSLD_PC), and the offset of that particular symbol
(R_ABS).

Given the similarity, we can just use the expressions instead of
having two additional target hooks.

llvm-svn: 302279
2017-05-05 20:25:54 +00:00
Matthias Braun 60b40b8fec TargetLibraryInfo: Introduce wcslen
wcslen is part of the C99 and C++98 standards.

- This introduces the function to TargetLibraryInfo.
- Also set attributes for wcslen in llvm::inferLibFuncAttributes().

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

llvm-svn: 302278
2017-05-05 20:25:50 +00:00
Konstantin Zhuravlyov 6ccb076aeb AMDGPU/AMDHSA: Set COMPUTE_PGM_RSRC2:LDS_SIZE to 0
This field is populated by the CP

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

llvm-svn: 302277
2017-05-05 20:13:55 +00:00
Michael Kruse 391a2ac09b [ScopBuilder] Move Scop::init to ScopBuilder. NFC.
Scop::init is used only during SCoP construction. Therefore ScopBuilder
seems the more appropriate place for it. We integrate it onto its only
caller ScopBuilder::buildScop where some other construction steps
already took place.

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

llvm-svn: 302276
2017-05-05 20:09:08 +00:00
Aaron Ballman 05fd05ac52 Do not redefine the THREAD_ANNOTATION_ATTRIBUTE__ macro in the documentation.
Patch by Roman Lebedev.

llvm-svn: 302275
2017-05-05 19:56:09 +00:00
Weiming Zhao be380c711c [ARM] Limit the diagnose when an ISR calls a regular function
Summary:
When the function is compiled with soft-float or on CPU with no FPU, we
don't need to diagnose for a call from an ISR to a regular function.

Reviewers: jroelofs, eli.friedman

Reviewed By: jroelofs

Subscribers: aemerson, rengolin, javed.absar, cfe-commits

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

llvm-svn: 302274
2017-05-05 19:25:29 +00:00
Rui Ueyama 21ebb216ea Remove redundant `explicit`.
llvm-svn: 302273
2017-05-05 19:24:58 +00:00
Peter Collingbourne 44781f1b0c CFI: Add a blacklist entry for std::_Sp_counted_ptr_inplace::_Sp_counted_ptr_inplace().
This ctor is used by std::make_shared and needs to cast to uninitialized T*
in order to call std::allocator_traits<T>::construct.

llvm-svn: 302272
2017-05-05 18:46:14 +00:00
Saleem Abdulrasool d95f625000 CodeGen: avoid use of @clang.arc.use intrinsic at O0
The clang.arc.use intrinsic is removed via the ARC Contract Pass.  This
pass is only executed in optimized builds (>= opt level 1).  Prevent the
optimization implemented in SVN r301667 from triggering at optimization
level 0 like every other ARC use intrinsic usage.

llvm-svn: 302270
2017-05-05 18:39:06 +00:00
Reid Kleckner ac1a97b32f Simplify dbg.value handling in SDISel with early returns
No functional change other than improving dbgs logging accuracy on
constant dbg values. Previously we would add things like "i32 42" as
debug values, and then log that we were dropping the debug info, which
is silly.

Delete some dead code that was checking for static allocas. This
remained after r207165, but served no purpose. Currently, static alloca
dbg.values are always sent through the DanglingDebugInfoMap, and are
usually made valid the first time the alloca is used.

llvm-svn: 302267
2017-05-05 18:30:34 +00:00
Sam Clegg 03cdd1241f [WebAssembly] Add ObjectYAML support for wasm name section
Differential Revision: https://reviews.llvm.org/D32841

llvm-svn: 302266
2017-05-05 18:12:34 +00:00
Alexei Starovoitov 7bab73b1f8 [bpf] fix a bug which causes incorrect big endian reloc fixup
o Add bpfeb support in BPF dwarfdump unit test case

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@fb.com>
llvm-svn: 302265
2017-05-05 18:05:00 +00:00
Joerg Sonnenberger 9217b2ed0a Add NetBSD to the list of platforms supporting death tests. Two unit
tests require this for compilation.

llvm-svn: 302264
2017-05-05 17:57:45 +00:00
Joerg Sonnenberger ecfb876eac If posix_fallocate returns EOPNOTSUPP, fallback to ftruncate.
This can happen at least on NetBSD.

llvm-svn: 302263
2017-05-05 17:55:58 +00:00
Craig Topper f0aeee01c3 [KnownBits] Add wrapper methods for setting and clear all bits in the underlying APInts in KnownBits.
This adds routines for reseting KnownBits to unknown, making the value all zeros or all ones. It also adds methods for querying if the value is zero, all ones or unknown.

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

llvm-svn: 302262
2017-05-05 17:36:09 +00:00
Alexander Kornienko b48986782b [clang-tidy] Fix misc-move-const-arg for move-only types.
Summary: Fix misc-move-const-arg false positives on move-only types.

Reviewers: sbenza

Reviewed By: sbenza

Subscribers: xazax.hun, cfe-commits

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

llvm-svn: 302261
2017-05-05 17:33:49 +00:00
Francis Ricci f88bf5acfe Add missing 'arch' key to valid qHostInfo keys
Summary:
'arch' is a valid qHostInfo key, but the unit
test for qHostInfo did not include it in the set of possible keys.

Reviewers: tfiala, labath

Subscribers: lldb-commits

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

llvm-svn: 302260
2017-05-05 17:18:08 +00:00
Nico Weber 050af67ea8 ANSIfy more. Still no behavior change.
llvm-svn: 302259
2017-05-05 17:16:58 +00:00
Nico Weber 0a234047eb ANSIfy. No behavior change.
llvm-svn: 302258
2017-05-05 17:15:08 +00:00
Adrian McCarthy 60afb4386d Allow operator-> to work from a FixedStreamArrayIterator.
This is similar to my recent fix for VarStreamArrayIterator, but the cause
(and thus the fix) is subtley different.  The FixedStreamArrayIterator
iterates over a const Array, so the iterator's value type must be const.

llvm-svn: 302257
2017-05-05 17:14:00 +00:00
Craig Topper fc481e5eb7 [Float2Int] Replace a ConstantRange copy with a move. Remove an extra call to MapVector::find.
llvm-svn: 302256
2017-05-05 17:09:29 +00:00
Nico Weber 469891e7a2 Warn that the [] spelling of uuid(...) is deprecated.
https://reviews.llvm.org/D32879

llvm-svn: 302255
2017-05-05 17:05:56 +00:00
Zachary Turner 25597b2cc9 [ADT] Add BitVector::find_prev.
This almost completes the matrix of all possible find
functions.

*EXISTING*
----------
find_first
find_first_unset
find_next
find_next_unset
find_last
find_last_unset

*NEW*
----
find_prev

*STILL MISSING*
---------------
find_prev_unset

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

llvm-svn: 302254
2017-05-05 17:00:04 +00:00
Alex Lorenz 9c5c2bfe54 Add a fix-it for -Wunguarded-availability
This patch adds a fix-it for the -Wunguarded-availability warning. This fix-it
is similar to the Swift one: it suggests that you wrap the statement in an
`if (@available)` check. The produced fixits are indented (just like the Swift
ones) to make them look nice in Xcode's fix-it preview.

rdar://31680358

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

llvm-svn: 302253
2017-05-05 16:42:44 +00:00
Amaury Sechet 841b0907c4 Add more variations of addcarry in the tests. NFC.
llvm-svn: 302252
2017-05-05 16:27:55 +00:00
Sanjay Patel 3bf1d6b763 [InstSimplify] fix copy-paste mistake in test comments; NFC
llvm-svn: 302251
2017-05-05 16:24:58 +00:00
Alex Lorenz 9282483b11 [ObjC] Don't disallow vector parameters/return values in methods
whose introduced version is lower than the allowed version.

We should just rely on the target version as this introduced version can lead
to false positives (e.g. deprecated declarations).

rdar://31964333

llvm-svn: 302250
2017-05-05 16:15:17 +00:00
George Rimar e96287f40e [llvm-dwarfdump] - Add comment for maybeDecompress(). NFC.
Addresses post commit review comment.

llvm-svn: 302249
2017-05-05 16:13:10 +00:00
Sanjay Patel 34cd5e4307 [InstSimplify] add tests for (icmp X, C1 | icmp X, C2); NFC
These are the 'or' counterparts for the tests added with r300493.

llvm-svn: 302248
2017-05-05 16:12:05 +00:00
Nico Weber d7ba86b6bf Introduce Wzero-as-null-pointer-constant.
Add an opt-in warning that fires when 0 is used as a null pointer. 
gcc has this warning, and there's some demand for it.

https://reviews.llvm.org/D32914

llvm-svn: 302247
2017-05-05 16:11:08 +00:00
Nuno Lopes 8b66b00ecd fix build on Cygwin
llvm-svn: 302246
2017-05-05 16:08:22 +00:00
Jun Bum Lim 94d42533eb [AArch64] Remove AArch64AddressTypePromotion pass
Summary:
Remove the AArch64AddressTypePromotion pass as we migrated all transformations
done in this pass into CGP in r299379.

Reviewers: qcolombet, jmolloy, javed.absar, mcrosier

Reviewed By: qcolombet

Subscribers: aemerson, rengolin, mgorny, llvm-commits

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

llvm-svn: 302245
2017-05-05 16:05:41 +00:00
Tobias Grosser c1ddedc657 Fix typo
llvm-svn: 302244
2017-05-05 15:46:01 +00:00
Simon Pilgrim 3f8d8f5f43 [X86][SSE] Add 128/256/512 bit vector build vector from register tests
llvm-svn: 302243
2017-05-05 15:36:31 +00:00
Rafael Espindola 0f6cc65fe9 Remember OffsetInArchive in LazyObjectFile.
LazyObjectFile might turn out to be a BitcodeFile, so we need
OffsetInArchive.

llvm-svn: 302242
2017-05-05 15:17:07 +00:00
Rafael Espindola 0b1413a881 Use the archive offset with --whole-archive.
The test ELF/lto/thin-archivecollision.ll was not testing what it
wanted to test. It needs two archive members with the same name, but
different offsets.

Without this we could remove all references of OffsetInArchive and all
tests would still pass.

Fixing the test showed that the --whole-archive case was broken, which
this patch fixes.

llvm-svn: 302241
2017-05-05 15:08:06 +00:00
Alex Lorenz 921ab75854 [Driver] Add a "-mmacos_version_min" option that's an alias for
"-mmacosx_version_min"

The option -mmacosx_version_min will still be the canonical option for now, but
in the future we will switch over to -mmacos_version_min and make
-mmacosx_version_min an alias instead.

rdar://27043820

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

llvm-svn: 302240
2017-05-05 14:52:48 +00:00
Alexander Potapenko 27b09270c4 [ubsan]: temporarily disable print_stack_trace.cc test
Some problems with ARM stack unwinding led to inaccurate stack traces being
printed, which caused this test to fail on
http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh

llvm-svn: 302239
2017-05-05 14:51:16 +00:00
Aditya Kumar 1c42d135e1 [LoopIdiom] check for safety while expanding
Loop Idiom recognition was generating memset in a case that
would result generating a division operation to an unsafe location.

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

llvm-svn: 302238
2017-05-05 14:49:45 +00:00
Bill Seurer e608f6a632 [powerpc] Mark coverage-sample.cc as XFAIL on powerpc64le
When run this test case causes a segementation fault on powerpc64le.
The xfail should be removed when the problem is fixed.

llvm-svn: 302237
2017-05-05 14:20:11 +00:00
Krasimir Georgiev 024b0644a6 [Tooling] Remove redundant check, NFCi
Summary: The Database check looks redundant.

Reviewers: bkramer

Subscribers: klimek, cfe-commits

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

llvm-svn: 302236
2017-05-05 14:07:23 +00:00
Rafael Espindola 80ae8ae186 Remember archive name when creating LazyObjectFile.
It is needed for creating an unique identifier for ThinLTO.

This fixes pr32931.

llvm-svn: 302235
2017-05-05 13:55:51 +00:00
Michael Kruse f1052ceb5e [ScopBuilder] Do not verify unfeasible SCoPs.
SCoPs with unfeasible runtime context are thrown away and therefore
do not need their uses verified.

The added test case requires a complexity limit to exceed.
Normally, error statements are removed from the SCoP and for that
reason are skipped during the verification. If there is a unfeasible
runtime context (here: because of the complexity limit being reached),
the removal of error statements and other SCoP construction steps are
skipped to not waste time. Error statements are not modeled in SCoPs
and therefore have no requirements on whether the scalars used in
them are available.

llvm-svn: 302234
2017-05-05 13:38:35 +00:00
Simon Pilgrim ac3c4b6da4 [X86][AVX512] Improve support and testing for CTLZ of 512-bit vectors without CDI
llvm-svn: 302233
2017-05-05 13:31:52 +00:00
Tobias Grosser d5727c5011 Fix handling of signWrappedSets in access relations
Since r294891, in MemoryAccess::computeBoundsOnAccessRelation(), we skip
manually bounding the access relation in case the parameter of the load
instruction is already a wrapped set. Later on we assume that the lower
bound on the set is always smaller or equal to the upper bound on the
set. Bug 32715 manages to construct a sign wrapped set, in which case
the assertion does not necessarily hold. Fix this by handling a sign
wrapped set similar to a normal wrapped set, that is skipping the
computation.

Contributed-by: Maximilian Falkenstein <falkensm@student.ethz.ch>

Reviewers: grosser

Subscribers: pollydev, llvm-commits

Tags: #Polly

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

llvm-svn: 302231
2017-05-05 13:20:47 +00:00
Simon Pilgrim e9c5d7b70b [X86] Remove duplicate operation actions. NFCI.
llvm-svn: 302230
2017-05-05 12:34:55 +00:00