Saleem Abdulrasool [Sat, 6 May 2017 23:48:02 +0000 (23:48 +0000)]
COFF: add ARM64 relocation types
Add the ARM64 COFF relocation types. This will be needed to add support
for the AArch64 Windows object file emission support.
llvm-svn: 302365
Eric Fiselier [Sat, 6 May 2017 23:26:04 +0000 (23:26 +0000)]
Update LanguageExtensions doc to refer to C++14 instead of C++1y
llvm-svn: 302364
Eric Fiselier [Sat, 6 May 2017 22:10:14 +0000 (22:10 +0000)]
Fix undefined pthread references when building against libc++
llvm-svn: 302363
Dimitry Andric [Sat, 6 May 2017 20:58:50 +0000 (20:58 +0000)]
Ensure showbase does not overflow do_put buffers
Summary:
In https://bugs.freebsd.org/207918, Daniel McRobb describes how using
std::showbase with ostreams can cause truncation of unsigned long long
when output format is octal. In fact, this can even happen with
unsigned int and unsigned long.
To ensure this does not happen, add one additional character to the
do_put buffers if std::showbase is on. Also add a test case.
Reviewers: EricWF, mclow.lists
Reviewed By: EricWF
Subscribers: cfe-commits, emaste
Differential Revision: https://reviews.llvm.org/D32670
llvm-svn: 302362
Simon Pilgrim [Sat, 6 May 2017 20:53:52 +0000 (20:53 +0000)]
[X86][AVX512] Relax assertion and just exit combine for unsupported types (PR32907)
llvm-svn: 302361
Tobias Grosser [Sat, 6 May 2017 19:18:19 +0000 (19:18 +0000)]
Really disable test as intended in the previous commit
llvm-svn: 302360
Simon Pilgrim [Sat, 6 May 2017 19:11:59 +0000 (19:11 +0000)]
[X86][AVX512] Move v2i64/v4i64 VPABS lowering to tablegen
Extend NoVLX targets to use the 512-bit versions
llvm-svn: 302359
Tobias Grosser [Sat, 6 May 2017 18:50:28 +0000 (18:50 +0000)]
Disable test to avoid buildbot noise
This test was introduced in r302339. It works on my system, but breaks on the
buildbots.
llvm-svn: 302358
Simon Pilgrim [Sat, 6 May 2017 18:17:56 +0000 (18:17 +0000)]
[X86] Reduce code for setting operations actions by merging into loops across multiple types/ops. NFCI.
llvm-svn: 302357
Simon Pilgrim [Sat, 6 May 2017 17:42:09 +0000 (17:42 +0000)]
[NVPTX] Add support for ISD::ABS lowering
Use the ISD::ABS opcode directly
Differential Revision: https://reviews.llvm.org/D32944
llvm-svn: 302356
Simon Pilgrim [Sat, 6 May 2017 17:30:39 +0000 (17:30 +0000)]
[X86][SSE] Break register dependencies on v16i8/v8i16 BUILD_VECTOR on SSE41
rL294581 broke unnecessary register dependencies on partial v16i8/v8i16 BUILD_VECTORs, but on SSE41 we (currently) use insertion for full BUILD_VECTORs as well. By allowing full insertion to occur on SSE41 targets we can break register dependencies here as well.
llvm-svn: 302355
Brian Gesiak [Sat, 6 May 2017 16:22:53 +0000 (16:22 +0000)]
[Analysis] Print out unreachable loops
Summary:
When writing a loop pass I made a mistake and hit the assertion
"Unreachable block in loop". Later, I hit an assertion when I called
`BasicBlock::eraseFromParent()` incorrectly: "Use still stuck around
after Def is destroyed". This latter assertion, however, printed out
exactly which value is being deleted and what uses remain, which helped
me debug the issue.
To help people debugging their loop passes in the future, print out
exactly which basic block is unreachable in a loop.
Reviewers: sanjoy, hfinkel, mehdi_amini
Reviewed By: mehdi_amini
Subscribers: mzolotukhin
Differential Revision: https://reviews.llvm.org/D32878
llvm-svn: 302354
Martell Malone [Sat, 6 May 2017 15:13:17 +0000 (15:13 +0000)]
[builtins] Fixup emulated TLS for mingw.
Enabled emulated TLS on WOA for mingw
Fix <windows.h> include for mingw
Reviewed By: chapuni, mstorsjo
Subscribers: compnerd, llvm-commits
Differential Revision: https://reviews.llvm.org/D32681
llvm-svn: 302340
Michael Kruse [Sat, 6 May 2017 14:03:58 +0000 (14:03 +0000)]
[DeLICM] Known knowledge.
Extend the Knowledge class to store information about the contents
of array elements and which values are written. Two knowledges do
not conflict the known content is the same. The content information
if computed from writes to and loads from the array elements, and
represented by "ValInst": isl spaces that compare equal if the value
represented is the same.
Differential Revision: https://reviews.llvm.org/D31247
llvm-svn: 302339
Simon Pilgrim [Sat, 6 May 2017 13:46:09 +0000 (13:46 +0000)]
[X86][AVX2] Add scheduling latency/throughput tests for some AVX2 instructions
Many more to come...
llvm-svn: 302338
Simon Pilgrim [Sat, 6 May 2017 13:44:42 +0000 (13:44 +0000)]
[DAGCombiner] If ISD::ABS is legal/custom, use it directly instead of canonicalizing first.
Remove an extra canonicalization step if ISD::ABS is going to be used anyway.
Updated x86 abs combine to check that we are lowering from both canonicalizations.
llvm-svn: 302337
Michael Kruse [Sat, 6 May 2017 13:42:15 +0000 (13:42 +0000)]
[CMake] Introduce POLLY_BUNDLED_JSONCPP.
Allow using a system's install jsoncpp library instead of the bundled
one with the setting POLLY_BUNDLED_JSONCPP=OFF.
This fixes llvm.org/PR32929
Differential Revision: https://reviews.llvm.org/D32922
llvm-svn: 302336
Craig Topper [Sat, 6 May 2017 06:03:07 +0000 (06:03 +0000)]
[SCEV] Remove extra APInt copies from getRangeForAffineARHelper.
This changes one parameter to be a const APInt& since we only read from it. Use std::move on local APInts once they are no longer needed so we can reuse their allocations. Lastly, use operator+=(uint64_t) instead of adding 1 to an APInt twice creating a new APInt each time.
llvm-svn: 302335
Craig Topper [Sat, 6 May 2017 05:22:56 +0000 (05:22 +0000)]
[SCEV] Use std::move to avoid some APInt copies.
llvm-svn: 302334
Craig Topper [Sat, 6 May 2017 05:15:11 +0000 (05:15 +0000)]
[SCEV] Use APInt's uint64_t operations instead of creating a temporary APInt to hold 1.
llvm-svn: 302333
Craig Topper [Sat, 6 May 2017 05:15:09 +0000 (05:15 +0000)]
[SCEV] Avoid a couple APInt copies by capturing by reference since the method returns a reference.
llvm-svn: 302332
Craig Topper [Sat, 6 May 2017 03:35:15 +0000 (03:35 +0000)]
[LazyValueInfo] Avoid unnecessary copies of ConstantRanges
Summary:
ConstantRange contains two APInts which can allocate memory if their width is larger than 64-bits. So we shouldn't copy it when we can avoid it.
This changes LVILatticeVal::getConstantRange() to return its internal ConstantRange by reference. This allows many places that just need a ConstantRange reference to avoid making a copy.
Several places now capture the return value of getConstantRange() by reference so they can call methods on it that don't need a new object.
Lastly it adds std::move in one place to capture to move a local ConstantRange into an LVILatticeVal.
Reviewers: reames, dberlin, sanjoy, anna
Reviewed By: reames
Subscribers: grandinj, llvm-commits
Differential Revision: https://reviews.llvm.org/D32884
llvm-svn: 302331
Eric Fiselier [Sat, 6 May 2017 02:58:43 +0000 (02:58 +0000)]
Fix lgamma_r linking errors on Windows. It appears the normal lgamma function is thread safe anyway
llvm-svn: 302330
Kamil Rytarowski [Sat, 6 May 2017 02:45:42 +0000 (02:45 +0000)]
Note addition of NetBSD support in googletest
Recreated patch for __NetBSD__ has been pushed upstream to Google.
llvm-svn: 302329
Jim Ingham [Sat, 6 May 2017 01:15:47 +0000 (01:15 +0000)]
Be a little more permissive in DynamicLoaderMacOS::CanLoadImage
If we can't find the "is dyld locked" symbol, assume it is safe
to load the image unless we only have 1 image loaded - in which case
we are in _dyld_start and it is definitely NOT safe.
Also add a little better errors to that function, and better logging
in SBProcess.cpp.
<rdar://problem/
30174817>
llvm-svn: 302327
Rui Ueyama [Fri, 5 May 2017 23:52:24 +0000 (23:52 +0000)]
Use the same terminology as ELF.
This patch do s/color/class/g.
llvm-svn: 302326
Stephan T. Lavavej [Fri, 5 May 2017 23:51:39 +0000 (23:51 +0000)]
[libcxx] [test] Suppress MSVC's /analyze warning C6294 in a more fine-grained manner.
Fixes D32926.
llvm-svn: 302325
Rui Ueyama [Fri, 5 May 2017 23:44:26 +0000 (23:44 +0000)]
Remove dead file.
llvm-svn: 302324
Jim Ingham [Fri, 5 May 2017 23:38:26 +0000 (23:38 +0000)]
Added "info threads", "thread 1" and "apropos".
llvm-svn: 302323
Stephan T. Lavavej [Fri, 5 May 2017 23:38:24 +0000 (23:38 +0000)]
[libcxx] [test] Fix MSVC "warning C6326: Potential comparison of a constant with another constant".
The expressions `1 == 1` and `true` have the same type, value category, and value.
Fixes D32924.
llvm-svn: 302322
Kostya Serebryany [Fri, 5 May 2017 23:28:47 +0000 (23:28 +0000)]
[sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. compiler-rt part (test only).
llvm-svn: 302321
Kostya Serebryany [Fri, 5 May 2017 23:28:18 +0000 (23:28 +0000)]
[sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. clang part.
llvm-svn: 302320
Kostya Serebryany [Fri, 5 May 2017 23:14:40 +0000 (23:14 +0000)]
[sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. llvm part.
llvm-svn: 302319
Stephan T. Lavavej [Fri, 5 May 2017 23:01:38 +0000 (23:01 +0000)]
[libcxx] [test] Be compatible with LWG 2438 "std::iterator inheritance shouldn't be mandated".
In C++17, these iterators are allowed but not required
to inherit from the deprecated std::iterator base class.
Fixes D32727.
llvm-svn: 302318
Jakub Kuderski [Fri, 5 May 2017 23:00:37 +0000 (23:00 +0000)]
[clang-tidy] Use cxxStdInitializerListExpr in modernize-use-emplace
Summary: Use the cxxStdInitializerListExp matcher from ASTMatchers.h instead of a local one.
Reviewers: aaron.ballman, alexfh, Prazek
Reviewed By: aaron.ballman
Subscribers: xazax.hun, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D32923
llvm-svn: 302317
Quentin Colombet [Fri, 5 May 2017 22:48:22 +0000 (22:48 +0000)]
[RegisterBankInfo] Uniquely allocate instruction mapping.
This is a step toward having statically allocated instruciton mapping.
We are going to tablegen them eventually, so let us reflect that in
the API.
NFC.
llvm-svn: 302316
Craig Topper [Fri, 5 May 2017 22:46:40 +0000 (22:46 +0000)]
[BitVector] Improve the description of the BitVector::clear to say it removes the bits rather than clearing since clearing could be interpreted as just zeroing. NFC
llvm-svn: 302315
Lang Hames [Fri, 5 May 2017 22:42:13 +0000 (22:42 +0000)]
Add DidStartExecuting/WillFinishExecuting methods to Expression.
These methods can be used by the derived expression types to perform expression
specific and/or language specific actions before and after the expression runs.
(ThreadPlanCallUserExpression is modified to call these methods on the
expression immediately before/after execution of the expression).
The immediate motivation is allowing Swift expressions to notify the swift
runtime that exclusivity enforcement should be suspended while the expression
runs (we want LLDB expressions to be able to access variables even when they're
considered exclusively owned by someone else in the original program).
Reviewed in https://reviews.llvm.org/D32889
llvm-svn: 302314
Tim Northover [Fri, 5 May 2017 22:36:06 +0000 (22:36 +0000)]
AArch64: fix weird edge case in ABI.
It turns out there are some sort-of-but-not-quite empty structs that break all
the rules. For example:
struct SuperEmpty { int arr[0]; };
struct SortOfEmpty { struct SuperEmpty e; };
Both of these have sizeof == 0, even in C++ mode, for GCC compatibility. The
first one also doesn't occupy a register when passed by value in GNU C++ mode,
unlike everything else.
On Darwin, we want to ignore the lot (and especially don't want to try to use
an i0 as we were).
llvm-svn: 302313
Richard Smith [Fri, 5 May 2017 22:34:07 +0000 (22:34 +0000)]
Permit keywords in module names in #pragma clang module *.
This is necessary to be able to build a libc++ module from preprocessed source
(due to the submodule std.new).
llvm-svn: 302312
Craig Topper [Fri, 5 May 2017 22:31:11 +0000 (22:31 +0000)]
Fix spelling error in command line option description. NFC
llvm-svn: 302311
Eugene Zelenko [Fri, 5 May 2017 22:30:37 +0000 (22:30 +0000)]
[IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
llvm-svn: 302310
Richard Smith [Fri, 5 May 2017 22:18:51 +0000 (22:18 +0000)]
Add support for building modules from preprocessed source.
To support this, an optional marker "#pragma clang module contents" is
recognized in module map files, and the rest of the module map file from that
point onwards is treated as the source of the module. Preprocessing a module
map produces the input module followed by the marker and then the preprocessed
contents of the module.
Ignoring line markers, a preprocessed module might look like this:
module A {
header "a.h"
}
#pragma clang module contents
#pragma clang module begin A
// ... a.h ...
#pragma clang module end
The preprocessed output generates line markers, which are not accepted by the
module map parser, so -x c++-module-map-cpp-output should be used to compile
such outputs.
A couple of major parts do not work yet:
1) The files that are listed in the module map must exist on disk, in order to
build the on-disk header -> module lookup table in the PCM file. To fix
this, we need the preprocessed output to track the file size and other stat
information we might use to build the lookup table.
2) Declaration ownership semantics don't work properly yet, since mapping from
a source location to a module relies on mapping from FileIDs to modules,
which we can't do if module transitions can occur in the middle of a file.
llvm-svn: 302309
Easwaran Raman [Fri, 5 May 2017 22:15:09 +0000 (22:15 +0000)]
Override invalidate of ProfileSummaryInfo to return false.
Differential revision: https://reviews.llvm.org/D32775
llvm-svn: 302308
Krzysztof Parzyszek [Fri, 5 May 2017 22:13:57 +0000 (22:13 +0000)]
[Hexagon] Disable predicated calls by default
llvm-svn: 302307
Krzysztof Parzyszek [Fri, 5 May 2017 22:12:12 +0000 (22:12 +0000)]
[Hexagon] Remove C6 and C7 as separate registers
These are M0 and M1. Removing duplicated registers reduces the number
of explicit register aliasing.
llvm-svn: 302306
Krzysztof Parzyszek [Fri, 5 May 2017 22:10:32 +0000 (22:10 +0000)]
[RDF] Remove covered parts of reached uses for phi and use in same block
llvm-svn: 302305
Zachary Turner [Fri, 5 May 2017 22:06:06 +0000 (22:06 +0000)]
lld Fixups for TypeDatabase changes.
llvm-svn: 302304
Matthias Braun [Fri, 5 May 2017 22:04:05 +0000 (22:04 +0000)]
ARM: Compute MaxCallFrame size early
This exposes a method in MachineFrameInfo that calculates
MaxCallFrameSize and calls it after instruction selection in the ARM
target.
This avoids
ARMBaseRegisterInfo::canRealignStack()/ARMFrameLowering::hasReservedCallFrame()
giving different answers in early/late phases of codegen.
The testcase shows a particular nasty example result of that where we
would fail to properly align an alloca.
Differential Revision: https://reviews.llvm.org/D32622
llvm-svn: 302303
Zachary Turner [Fri, 5 May 2017 22:02:37 +0000 (22:02 +0000)]
[CodeView] Reserve TypeDatabase records up front.
Most of the time we know exactly how many type records we
have in a list, and we want to use the visitor to deserialize
them into actual records in a database. Previously we were
just using push_back() every time without reserving the space
up front in the vector. This is obviously terrible from a
performance standpoint, and it's not uncommon to have PDB
files with half a million type records, where the performance
degredation was quite noticeable.
llvm-svn: 302302
Matthias Braun [Fri, 5 May 2017 21:50:26 +0000 (21:50 +0000)]
Add missing target triple to test
llvm-svn: 302301
Kostya Kortchinsky [Fri, 5 May 2017 21:38:22 +0000 (21:38 +0000)]
[scudo] Add Android support
Summary:
This change adds Android support to the allocator (but doesn't yet enable it in
the cmake config), and should be the last fragment of the rewritten change
D31947.
Android has more memory constraints than other platforms, so the idea of a
unique context per thread would not have worked. The alternative chosen is to
allocate a set of contexts based on the number of cores on the machine, and
share those contexts within the threads. Contexts can be dynamically reassigned
to threads to prevent contention, based on a scheme suggested by @dvyuokv in
the initial review.
Additionally, given that Android doesn't support ELF TLS (only emutls for now),
we use the TSan TLS slot to make things faster: Scudo is mutually exclusive
with other sanitizers so this shouldn't cause any problem.
An additional change made here, is replacing `thread_local` by `THREADLOCAL`
and using the initial-exec thread model in the non-Android version to prevent
extraneous weak definition and checks on the relevant variables.
Reviewers: kcc, dvyukov, alekseyshl
Reviewed By: alekseyshl
Subscribers: srhines, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D32649
llvm-svn: 302300
Rafael Espindola [Fri, 5 May 2017 21:34:26 +0000 (21:34 +0000)]
Delete LinkerScript::getSectionIndex.
We can set SectionIndex tentatively as we process the linker script
instead of looking it repeatedly.
In general we should try to have as few name lookups as possible.
llvm-svn: 302299
Eric Fiselier [Fri, 5 May 2017 21:32:37 +0000 (21:32 +0000)]
Mark test using <sys/time.h> as UNSUPPORTED on Windows
llvm-svn: 302298
Eric Fiselier [Fri, 5 May 2017 21:31:22 +0000 (21:31 +0000)]
Fix condition_variable::wait_until and wait_for on Windows.
The ERROR_TIMEDOUT returned by the Windows API does not
have the same value as ETIMEDOUT. This caused condition_variable
to return timeouts as unknown errors.
llvm-svn: 302297
Jonathan Roelofs [Fri, 5 May 2017 21:30:13 +0000 (21:30 +0000)]
Multilib: add dump methods
llvm-svn: 302296
Rui Ueyama [Fri, 5 May 2017 21:27:30 +0000 (21:27 +0000)]
Fix build breakage on Linux.
llvm-svn: 302295
Zachary Turner [Fri, 5 May 2017 21:25:31 +0000 (21:25 +0000)]
Fix -Wreorder warning.
llvm-svn: 302294
Zachary Turner [Fri, 5 May 2017 21:18:26 +0000 (21:18 +0000)]
Fix another incorrectly cased header include.
llvm-svn: 302293
Zachary Turner [Fri, 5 May 2017 21:15:31 +0000 (21:15 +0000)]
[StreamArray] Pipe the Offset through the constructor.
When randomly accessing an element by offset, we weren't passing
the offset through so if you called .offset() it would return a
value of 0.
llvm-svn: 302292
Zachary Turner [Fri, 5 May 2017 21:14:55 +0000 (21:14 +0000)]
Fix #include case sensitivity problem.
llvm-svn: 302291
Kannan Narayanan [Fri, 5 May 2017 21:10:17 +0000 (21:10 +0000)]
[AMDGPU] In the new waitcnt insertion pass, use getHeader
instead of getTopBlock to find the loop header.
Differential Revision: https://reviews.llvm.org/D32831
llvm-svn: 302290
Matthias Braun [Fri, 5 May 2017 21:09:30 +0000 (21:09 +0000)]
MIParser/MIRPrinter: Compute block successors if not explicitely specified
- MIParser: If the successor list is not specified successors will be
added based on basic block operands in the block and possible
fallthrough.
- MIRPrinter: Adds a new `simplify-mir` option, with that option set:
Skip printing of block successor lists in cases where the
parser is guaranteed to reconstruct it. This means we still print the
list if some successor cannot be determined (happens for example for
jump tables), if the successor order changes or branch probabilities
being unequal.
Differential Revision: https://reviews.llvm.org/D31262
llvm-svn: 302289
Zachary Turner [Fri, 5 May 2017 21:09:26 +0000 (21:09 +0000)]
Split up Parallel and LLVM'ize naming conventions.
This is one step in preparation of raising this up to
LLVM. This hides all of the Executor stuff in a private
implementation file, leaving only the core algorithms and
the TaskGroup class exposed. In doing so, fix up all the
variable names to conform to LLVM style.
Differential Revision: https://reviews.llvm.org/D32890
llvm-svn: 302288
Jakub Kuderski [Fri, 5 May 2017 21:01:12 +0000 (21:01 +0000)]
Add cxxStdInitializerListExpr AST matcher
Summary:
This adds a new ASTMatcher for CXXStdInitializerListExprs that matches C++ initializer list expressions.
The primary motivation is to use it to fix [[ https://bugs.llvm.org/show_bug.cgi?id=32896 | PR32896 ]] (review here [[ https://reviews.llvm.org/D32767 | D32767 ]]).
Reviewers: alexfh, Prazek, aaron.ballman
Reviewed By: alexfh, aaron.ballman
Subscribers: malcolm.parsons, cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D32810
llvm-svn: 302287
Simon Pilgrim [Fri, 5 May 2017 20:53:52 +0000 (20:53 +0000)]
[X86] Use SDValue::getConstantOperandVal helper. NFCI.
llvm-svn: 302286
Eric Fiselier [Fri, 5 May 2017 20:50:24 +0000 (20:50 +0000)]
Fix detection for [[fallthrough]] with GCC
llvm-svn: 302285
Richard Trieu [Fri, 5 May 2017 20:47:50 +0000 (20:47 +0000)]
[ODRHash] Fix typo, NFC
NestedNameSpecifer to NestedNameSpecifier. This was not a problem before since
one of the included headers transitively brought in the definition of the class
and only manifested as a problem when using the typoed NestedNameSpecifer and
getting an incomplete type error instead of a typo correction.
llvm-svn: 302284
Eric Fiselier [Fri, 5 May 2017 20:39:03 +0000 (20:39 +0000)]
Fix remaining GCC 7 build warnings
llvm-svn: 302283
Chris Bieneman [Fri, 5 May 2017 20:35:50 +0000 (20:35 +0000)]
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
Jakub Kuderski [Fri, 5 May 2017 20:35:30 +0000 (20:35 +0000)]
[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
Eric Fiselier [Fri, 5 May 2017 20:32:26 +0000 (20:32 +0000)]
Fix new warnings emitted by GCC 7
llvm-svn: 302280
Rafael Espindola [Fri, 5 May 2017 20:25:54 +0000 (20:25 +0000)]
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
Matthias Braun [Fri, 5 May 2017 20:25:50 +0000 (20:25 +0000)]
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
Konstantin Zhuravlyov [Fri, 5 May 2017 20:13:55 +0000 (20:13 +0000)]
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
Michael Kruse [Fri, 5 May 2017 20:09:08 +0000 (20:09 +0000)]
[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
Aaron Ballman [Fri, 5 May 2017 19:56:09 +0000 (19:56 +0000)]
Do not redefine the THREAD_ANNOTATION_ATTRIBUTE__ macro in the documentation.
Patch by Roman Lebedev.
llvm-svn: 302275
Weiming Zhao [Fri, 5 May 2017 19:25:29 +0000 (19:25 +0000)]
[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
Rui Ueyama [Fri, 5 May 2017 19:24:58 +0000 (19:24 +0000)]
Remove redundant `explicit`.
llvm-svn: 302273
Peter Collingbourne [Fri, 5 May 2017 18:46:14 +0000 (18:46 +0000)]
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
Saleem Abdulrasool [Fri, 5 May 2017 18:39:06 +0000 (18:39 +0000)]
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
Reid Kleckner [Fri, 5 May 2017 18:30:34 +0000 (18:30 +0000)]
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
Sam Clegg [Fri, 5 May 2017 18:12:34 +0000 (18:12 +0000)]
[WebAssembly] Add ObjectYAML support for wasm name section
Differential Revision: https://reviews.llvm.org/D32841
llvm-svn: 302266
Alexei Starovoitov [Fri, 5 May 2017 18:05:00 +0000 (18:05 +0000)]
[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
Joerg Sonnenberger [Fri, 5 May 2017 17:57:45 +0000 (17:57 +0000)]
Add NetBSD to the list of platforms supporting death tests. Two unit
tests require this for compilation.
llvm-svn: 302264
Joerg Sonnenberger [Fri, 5 May 2017 17:55:58 +0000 (17:55 +0000)]
If posix_fallocate returns EOPNOTSUPP, fallback to ftruncate.
This can happen at least on NetBSD.
llvm-svn: 302263
Craig Topper [Fri, 5 May 2017 17:36:09 +0000 (17:36 +0000)]
[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
Alexander Kornienko [Fri, 5 May 2017 17:33:49 +0000 (17:33 +0000)]
[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
Francis Ricci [Fri, 5 May 2017 17:18:08 +0000 (17:18 +0000)]
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
Nico Weber [Fri, 5 May 2017 17:16:58 +0000 (17:16 +0000)]
ANSIfy more. Still no behavior change.
llvm-svn: 302259
Nico Weber [Fri, 5 May 2017 17:15:08 +0000 (17:15 +0000)]
ANSIfy. No behavior change.
llvm-svn: 302258
Adrian McCarthy [Fri, 5 May 2017 17:14:00 +0000 (17:14 +0000)]
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
Craig Topper [Fri, 5 May 2017 17:09:29 +0000 (17:09 +0000)]
[Float2Int] Replace a ConstantRange copy with a move. Remove an extra call to MapVector::find.
llvm-svn: 302256
Nico Weber [Fri, 5 May 2017 17:05:56 +0000 (17:05 +0000)]
Warn that the [] spelling of uuid(...) is deprecated.
https://reviews.llvm.org/D32879
llvm-svn: 302255
Zachary Turner [Fri, 5 May 2017 17:00:04 +0000 (17:00 +0000)]
[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
Alex Lorenz [Fri, 5 May 2017 16:42:44 +0000 (16:42 +0000)]
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
Amaury Sechet [Fri, 5 May 2017 16:27:55 +0000 (16:27 +0000)]
Add more variations of addcarry in the tests. NFC.
llvm-svn: 302252
Sanjay Patel [Fri, 5 May 2017 16:24:58 +0000 (16:24 +0000)]
[InstSimplify] fix copy-paste mistake in test comments; NFC
llvm-svn: 302251
Alex Lorenz [Fri, 5 May 2017 16:15:17 +0000 (16:15 +0000)]
[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
George Rimar [Fri, 5 May 2017 16:13:10 +0000 (16:13 +0000)]
[llvm-dwarfdump] - Add comment for maybeDecompress(). NFC.
Addresses post commit review comment.
llvm-svn: 302249