Rafael Espindola [Thu, 3 Nov 2016 16:10:39 +0000 (16:10 +0000)]
Inline function into only use.
llvm-svn: 285928
Saleem Abdulrasool [Thu, 3 Nov 2016 15:56:06 +0000 (15:56 +0000)]
vim: special case the CHECK prefix
A large number of tests in the LLVM tree use the default (CHECK) prefix
to indicate checked expressions via FileCheck. Highlight it as a
special comment. Although this wont get all the instances of the
checked patters, it is strictly better than the current state.
llvm-svn: 285927
Rafael Espindola [Thu, 3 Nov 2016 15:43:47 +0000 (15:43 +0000)]
Initialize the StringTable early and do it only once.
llvm-svn: 285926
Samuel Antao [Thu, 3 Nov 2016 15:41:50 +0000 (15:41 +0000)]
Rename the version of ConstructJob for multiple outputs to ConstructJobMultipleOutputs.
It was causing trouble with the GCC bots.
llvm-svn: 285925
Michael Kruse [Thu, 3 Nov 2016 15:19:41 +0000 (15:19 +0000)]
[ScopInfo] Fix isl object leak.
Fix return from function without releasing isl objects, which was introduced
in r269055.
llvm-svn: 285924
Akira Hatanaka [Thu, 3 Nov 2016 15:04:58 +0000 (15:04 +0000)]
[Sema] Avoid instantiating templates only when UncompilableErrorOccurred
and FatalErrorOccurred are both set.
This fixes a crash that occurs when a warning promoted to a fatal error
leaves the AST in an incomplete state, and then later CFG analysis is
run on the incomplete AST.
rdar://problem/
28558923
Differential Revision: https://reviews.llvm.org/D26166
llvm-svn: 285923
Rafael Espindola [Thu, 3 Nov 2016 15:01:12 +0000 (15:01 +0000)]
Delete dead code.
llvm-svn: 285922
Rafael Espindola [Thu, 3 Nov 2016 14:53:25 +0000 (14:53 +0000)]
Return existing error code.
Should fix the -Werror bots.
llvm-svn: 285921
Rafael Espindola [Thu, 3 Nov 2016 14:41:17 +0000 (14:41 +0000)]
Move a free function out of ELFFile.
llvm-svn: 285920
Alexander Timofeev [Thu, 3 Nov 2016 14:37:13 +0000 (14:37 +0000)]
[AMDGPU][CodeGen] To improve CGEMM performance: combine LDS reads.
hange explores the fact that LDS reads may be reordered even if access
the same location.
Prior the change, algorithm immediately stops as soon as any memory
access encountered between loads that are expected to be merged
together. Although, Read-After-Read conflict cannot affect execution
correctness.
Improves hcBLAS CGEMM manually loop-unrolled kernels performance by 44%.
Also improvement expected on any massive sequences of reads from LDS.
Differential Revision: https://reviews.llvm.org/D25944
llvm-svn: 285919
Rafael Espindola [Thu, 3 Nov 2016 14:26:25 +0000 (14:26 +0000)]
Use the getSectionIndex from llvm.
llvm-svn: 285918
Zvi Rackover [Thu, 3 Nov 2016 14:25:24 +0000 (14:25 +0000)]
Refactor creation of X86ISD::SETCC nodes to a helper function. NFC.
llvm-svn: 285917
Nicolai Haehnle [Thu, 3 Nov 2016 14:25:04 +0000 (14:25 +0000)]
DAGCombiner: fix use-after-free when merging consecutive stores
Summary:
Have MergeConsecutiveStores explicitly return information about the stores
that were merged, so that we can safely determine whether the starting
node has been freed.
Reviewers: chandlerc, bogner, niravd
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25601
llvm-svn: 285916
Rafael Espindola [Thu, 3 Nov 2016 14:24:53 +0000 (14:24 +0000)]
Split out a getSectionIndex.
That code is currently duplicated in lld.
llvm-svn: 285915
Rafael Espindola [Thu, 3 Nov 2016 14:17:53 +0000 (14:17 +0000)]
Use existing ELFObj function. NFC.
llvm-svn: 285913
James Molloy [Thu, 3 Nov 2016 14:08:01 +0000 (14:08 +0000)]
Revert "[Thumb] Teach ISel how to lower compares of AND bitmasks efficiently"
This reverts commit r285893. It caused (probably) http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh/builds/83 .
llvm-svn: 285912
Rafael Espindola [Thu, 3 Nov 2016 13:58:26 +0000 (13:58 +0000)]
Update for llvm change.
llvm-svn: 285911
Rafael Espindola [Thu, 3 Nov 2016 13:58:15 +0000 (13:58 +0000)]
replace a report_fatal_error with a ErrorOr.
llvm-svn: 285910
Jonathan Coe [Thu, 3 Nov 2016 13:55:34 +0000 (13:55 +0000)]
Support for Python 3 in libclang python bindings
Summary:
Python bindings tests now pass in Python 3.
`map` in Python 3 is lazily evaluated so the method by which functions are registered needed updating.
Strings are unicode in Python 3 not UTF-8, I've tried to create an new c_types-like class (c_string_p) to automate the conversion.
String conversions made explicit where required.
Reviewers: eliben, nemanjai, skalinichev, compnerd
Subscribers: mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D26082
llvm-svn: 285909
John Brawn [Thu, 3 Nov 2016 13:55:04 +0000 (13:55 +0000)]
[CMake] Make CMAKE_INSTALL_RPATH work again
r285714 made it so that when CMAKE_INSTALL_RPATH is set _install_rpath is not
set, but that means INSTALL_RPATH gets set to an empty string which isn't what
we want. Fix this by setting INSTALL_RPATH only when _install_rpath is set.
llvm-svn: 285908
Jonathan Coe [Thu, 3 Nov 2016 13:52:09 +0000 (13:52 +0000)]
[clang-tidy] Ignore forward declarations without definitions in the same translation unit in readability-identifier-naming
Summary: This change ensures that forward declarations of classes are not considered for identifier naming checks within a translation unit.
Reviewers: alexfh, aaron.ballman
Subscribers: mgehre
Differential Revision: https://reviews.llvm.org/D22571
llvm-svn: 285907
Rafael Espindola [Thu, 3 Nov 2016 13:43:51 +0000 (13:43 +0000)]
Update for llvm change.
llvm-svn: 285906
Rafael Espindola [Thu, 3 Nov 2016 13:43:30 +0000 (13:43 +0000)]
Replace a report_fatal_error with an ErrorOr.
llvm-svn: 285905
Rafael Espindola [Thu, 3 Nov 2016 13:24:29 +0000 (13:24 +0000)]
Pass the section table around instead of recomputing it.
llvm-svn: 285904
Rafael Espindola [Thu, 3 Nov 2016 13:22:51 +0000 (13:22 +0000)]
Split getStringTableForSymtab.
For use in cases where we already have the section table.
llvm-svn: 285903
Aidan Dodds [Thu, 3 Nov 2016 13:20:37 +0000 (13:20 +0000)]
[Renderscript] Add commands for scriptgroup interaction.
This commit hooks the nofity function that signals script group
compilation. By tracking scriptgroups compiled at runtine, users
are able to place breakpoints by script group name. Breakpoints
will be placed on the kernels forming the group.
llvm-svn: 285902
Malcolm Parsons [Thu, 3 Nov 2016 12:56:48 +0000 (12:56 +0000)]
[clang-tidy] Handle data() in readability-redundant-string-cstr
Summary:
std::string::data() and std::string::c_str() are equivalent.
Enhance the readability-redundant-string-cstr check to also handle
calls to data().
Reviewers: etienneb, alexfh, aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26279
llvm-svn: 285901
George Rimar [Thu, 3 Nov 2016 12:49:25 +0000 (12:49 +0000)]
[ELF] - Accept both "-" and "--" for Ttext/Tdata/Tbss options.
llvm-svn: 285900
Malcolm Parsons [Thu, 3 Nov 2016 12:25:51 +0000 (12:25 +0000)]
Remove redundant calls to std::string::data()
Reviewers: aaron.ballman, mehdi_amini, dblaikie
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D26276
llvm-svn: 285899
Rafael Espindola [Thu, 3 Nov 2016 12:23:41 +0000 (12:23 +0000)]
Split getSHNDXTable in two.
Some clients already have the section table available.
llvm-svn: 285898
Rafael Espindola [Thu, 3 Nov 2016 12:21:00 +0000 (12:21 +0000)]
We already have the sections, pass them to getSHNDXTable.
llvm-svn: 285897
Peter Smith [Thu, 3 Nov 2016 11:49:23 +0000 (11:49 +0000)]
[ELF] Do not create interworking thunks for undefined weak references.
An undefined weak reference is given an address of 0 this will
incorrectly trigger the creation of a Thumb to ARM interworking Thunk
if there is a Thumb branch instruction to the symbol. This results in
an error as Thunks only make sense to defined or shared symbols.
We prevent this by detecting an undefined symbol and not creating a thunk
for it.
Differential Revision: https://reviews.llvm.org/D26239
llvm-svn: 285896
Eugene Leviant [Thu, 3 Nov 2016 10:54:58 +0000 (10:54 +0000)]
Use globMatch() instead of llvm::regex in linker scripts
This can speed up lld up to 5 times when linking applications
with large number of sections and using linker script.
Differential revision: https://reviews.llvm.org/D26241
llvm-svn: 285895
Pavel Labath [Thu, 3 Nov 2016 10:52:17 +0000 (10:52 +0000)]
Link lldb-mi only to the llvm components it uses
Summary:
liblldb does not re-export the llvm library contained within, so lldb-mi needs to
manage its own dependencies. Right now it only uses the llvm support library.
Reviewers: beanz, zturner, tfiala, clayborg, abidh
Subscribers: ki.stfu, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D26190
llvm-svn: 285894
James Molloy [Thu, 3 Nov 2016 10:18:20 +0000 (10:18 +0000)]
[Thumb] Teach ISel how to lower compares of AND bitmasks efficiently
This recommits r281323, which was backed out for two reasons. One, a selfhost failure, and two, it apparently caused Chromium failures. Actually, the latter was a red herring. The log has expired from the former, but I suspect that was a red herring too (actually caused by another problematic patch of mine). Therefore reapplying, and will watch the bots like a hawk.
For the common pattern (CMPZ (AND x, #bitmask), #0), we can do some more efficient instruction selection if the bitmask is one consecutive sequence of set bits (32 - clz(bm) - ctz(bm) == popcount(bm)).
1) If the bitmask touches the LSB, then we can remove all the upper bits and set the flags by doing one LSLS.
2) If the bitmask touches the MSB, then we can remove all the lower bits and set the flags with one LSRS.
3) If the bitmask has popcount == 1 (only one set bit), we can shift that bit into the sign bit with one LSLS and change the condition query from NE/EQ to MI/PL (we could also implement this by shifting into the carry bit and branching on BCC/BCS).
4) Otherwise, we can emit a sequence of LSLS+LSRS to remove the upper and lower zero bits of the mask.
1-3 require only one 16-bit instruction and can elide the CMP. 4 requires two 16-bit instructions but can elide the CMP and doesn't require materializing a complex immediate, so is also a win.
llvm-svn: 285893
Pavel Labath [Thu, 3 Nov 2016 10:07:47 +0000 (10:07 +0000)]
Fix Timer unit test
I did not take into account that the output of the Dump function will be
non-deterministic. Fix that by increasing of the times, this also makes the test
check that the dump function sorts the output.
llvm-svn: 285892
Pavel Labath [Thu, 3 Nov 2016 09:29:56 +0000 (09:29 +0000)]
Remove TimeSpecTimeout class
the class is unused.
llvm-svn: 285891
Pavel Labath [Thu, 3 Nov 2016 09:14:09 +0000 (09:14 +0000)]
Refactor Timer class
Summary:
While removing TimeValue from this class I noticed a lot of room for small
simplifications here. Main are:
- instead of complicated start-stop dances to compute own time, each Timer
just starts the timer once, and keeps track of the durations of child
timers. Then the own time can be computed at the end by subtracting the two
values.
- remove double accounting in TimerStack - the stack object already knows the
number of timers.
The interface does not lend itself well to unit testing, but I have added a
couple of tests which can (and did) catch any obvious errors.
Reviewers: tberghammer, clayborg
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D26243
llvm-svn: 285890
Serge Pavlov [Thu, 3 Nov 2016 08:58:44 +0000 (08:58 +0000)]
Reverted r285882 (Enhancement to test for -ast-print)
It broke buildbot on Windows.
llvm-svn: 285889
George Rimar [Thu, 3 Nov 2016 08:42:52 +0000 (08:42 +0000)]
[ELF] - Update after LLVM change (r285886)
llvm-svn: 285888
George Rimar [Thu, 3 Nov 2016 08:41:46 +0000 (08:41 +0000)]
[tools/obj2yaml] - Update after LLVM change r285886
llvm-svn: 285887
George Rimar [Thu, 3 Nov 2016 08:40:55 +0000 (08:40 +0000)]
[Object/ELF] - Make getSymbol() return Error.
That is consistent with other methods around
and helps to handle error on a caller side.
Differential revision: https://reviews.llvm.org/D26247
llvm-svn: 285886
Ravitheja Addepally [Thu, 3 Nov 2016 08:35:55 +0000 (08:35 +0000)]
Test for YMMRegisters.
Summary:
This patch contains test for reading YMM Registers. The test basically
contains an inferior that loads the ymm registers with a bit pattern
and the python test executes register read to check if the bit pattern
is correctly written in the registers. This test is repeated twice for
each register with a different pattern for better sanity.
Reviewers: tberghammer, zturner, clayborg
Subscribers: tberghammer, danalbert, srhines
Differential Revision: https://reviews.llvm.org/D26242
llvm-svn: 285885
George Rimar [Thu, 3 Nov 2016 08:20:57 +0000 (08:20 +0000)]
[ELF] - Removed unused method declaration. NFC.
llvm-svn: 285884
Olivier Goffart [Thu, 3 Nov 2016 07:36:17 +0000 (07:36 +0000)]
Fix heuristics skipping invalid ctor-initializers with C++11
Use better heuristics to detect if a '{' might be the start of the constructor body
or not. Especially when there is a completion token.
Fix the test 'test/CodeCompletion/ctor-initializer.cpp ' when clang defaults to c++11
The problem was is how we recover invalid code in the ctor-init part as we skip the
function body. In particular, we want to know if a '{' is the begining of the body.
In C++03, we always consider it as the beginng of the body. The problem was that in
C++11, it may be the start of an initializer, so we skip over it, causing further
parse errors later. (It is important that we are able to parse correctly the rest
of the class definition, to know what are the class member, for example)
This commit is improving the heuristics to decide if the '{' is starting a function
body. The rules are the following: If we are not in a template argument, and that the
previous tokens are not an identifier, or a >, then it is much more likely to be the
function body. We verify that further by checking the token after the matching '}'
The commit also fix the behavior when there is a code_completion token in the
ctor-initializers.
Differential Revision: https://reviews.llvm.org/D21502
llvm-svn: 285883
Serge Pavlov [Thu, 3 Nov 2016 07:32:02 +0000 (07:32 +0000)]
Enhancement to test for -ast-print
Present tests for the functionality provided by command lime option
`-ast-print` check only absence of crash. This change tries to make
testing better, - the output produced by the compiler is compiled again
with option `-print-ast` and both outputs are compared. Such test at
least checks that the output is valid code. This change fixes only the
test for pure C.
llvm-svn: 285882
Jonas Hahnfeld [Thu, 3 Nov 2016 06:58:16 +0000 (06:58 +0000)]
[CMake] Disable rpath for UnitTests
This was broken since rL285714.
Differential Revision: https://reviews.llvm.org/D26246
llvm-svn: 285881
Vedant Kumar [Thu, 3 Nov 2016 06:35:16 +0000 (06:35 +0000)]
[Sema] Remove a dead assignment, NFC.
The assignment to NextIsDereference is either followed by (1) another,
unrelated assignment to NextIsDereference or by (2) an early loop exit.
Found by clang's static analyzer: http://llvm.org/reports/scan-build
(While we're at it fix a typo.)
llvm-svn: 285879
Craig Topper [Thu, 3 Nov 2016 06:04:28 +0000 (06:04 +0000)]
[AVX-512] Use 'vnot' instead of 'not' in patterns involving vXi1 vectors.
This fixes selection of KANDN instructions and allows us to remove an extra set of patterns for KNOT and KXNOR.
Reviewers: delena, igorb
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26134
llvm-svn: 285878
Elena Demikhovsky [Thu, 3 Nov 2016 03:23:55 +0000 (03:23 +0000)]
Expandload and Compressstore intrinsics
2 new intrinsics covering AVX-512 compress/expand functionality.
This implementation includes syntax, DAG builder, operation lowering and tests.
Does not include: handling of illegal data types, codegen prepare pass and the cost model.
llvm-svn: 285876
Rafael Espindola [Thu, 3 Nov 2016 02:28:13 +0000 (02:28 +0000)]
Pass the sections to getShtGroupSignature.
This avoids fetching it again from the object.
llvm-svn: 285875
Rafael Espindola [Thu, 3 Nov 2016 02:24:59 +0000 (02:24 +0000)]
Split getSection in two.
This will allow avoiding repeated error checking in a few cases.
llvm-svn: 285874
George Burgess IV [Thu, 3 Nov 2016 02:21:43 +0000 (02:21 +0000)]
[CodeGen] Use StringRef. NFC.
Looks like CurFn's name outlives FunctionName, so we can just pass
StringRefs around rather than going from a StringRef to a std::string
to a const char* to a StringRef.
llvm-svn: 285873
Eric Fiselier [Thu, 3 Nov 2016 02:13:17 +0000 (02:13 +0000)]
[Sema] Allow static_cast<T&&>(e) to check explicit conversions for non-reference-related types.
Summary:
[expr.cast.static] states:
> 3. A glvalue of type “cv1 T1” can be cast to type “rvalue reference to cv2 T2” if “cv2 T2” is reference-compatible
> with “cv1 T1”. The result refers to the object or the specified base class subobject thereof. If T2 is
> an inaccessible or ambiguous base class of T1, a program that necessitates such a cast is
> ill-formed.
>
> 4. Otherwise, an expression e can be explicitly converted to a type T using a static_cast of the form static_-
> cast<T>(e) if the declaration T t(e); is well-formed, for some invented temporary variable t. [...]
Currently when checking p3 Clang will diagnose `static_cast<T&&>(e)` as invalid if the argument is not reference compatible with `T`. However I believe the correct behavior is to also check p4 in those cases. For example:
```
double y = 42;
static_cast<int&&>(y); // this should be OK. 'int&& t(y)' is well formed
```
Note that we still don't check p4 for non-reference-compatible types which are reference-related since `T&& t(e);` should never be well formed in those cases.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26231
llvm-svn: 285872
Teresa Johnson [Thu, 3 Nov 2016 01:07:16 +0000 (01:07 +0000)]
[ThinLTO] Handle distributed backend case when doing renaming
Summary:
The recent change I made to consult the summary when deciding whether to
rename (to handle inline asm) in r285513 broke the distributed build
case. In a distributed backend we will only have a portion of the
combined index, specifically for imported modules we only have the
summaries for any imported definitions. When renaming on import we were
asserting because no summary entry was found for a local reference being
linked in (def wasn't imported).
We only need to consult the summary for a renaming decision for the
exporting module. For imports, we would have prevented importing any
references to NoRename values already.
Reviewers: mehdi_amini
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26250
llvm-svn: 285871
Richard Smith [Thu, 3 Nov 2016 00:27:54 +0000 (00:27 +0000)]
Update manglings for C++17 noexcept function types to match Jason Merrill's
proposal on cxx-abi-dev earlier today.
llvm-svn: 285870
Richard Smith [Wed, 2 Nov 2016 23:57:18 +0000 (23:57 +0000)]
Teach clang-query to dump types. I couldn't find any existing tests for clang-query's dumping functionality. =(
llvm-svn: 285869
Argyrios Kyrtzidis [Wed, 2 Nov 2016 23:42:33 +0000 (23:42 +0000)]
[index] Fix assertion hit when handling a declaration of C++'s 'operator new' function.
Part of this is to allow creating a USR for the canonical decl of that which is implicit and does
not have a source location.
rdar://
28978992
llvm-svn: 285868
Richard Smith [Wed, 2 Nov 2016 23:41:51 +0000 (23:41 +0000)]
[p0012] Implement ABI support for throwing a noexcept function pointer and
catching as non-noexcept
This implements the following proposal from cxx-abi-dev:
http://sourcerytools.com/pipermail/cxx-abi-dev/2016-October/002988.html
... which is necessary for complete support of http://wg21.link/p0012,
specifically throwing noexcept function and member function pointers and
catching them as non-noexcept pointers.
Differential Review: https://reviews.llvm.org/D26178
llvm-svn: 285867
Greg Bedwell [Wed, 2 Nov 2016 23:17:05 +0000 (23:17 +0000)]
Revert "[InstCombine] allow splat vector folds in adjustMinMax()"
This reverts commit r285732.
This change introduced a new assertion failure in the following
testcase at -O2:
typedef short __v8hi __attribute__((__vector_size__(16)));
__v8hi foo(__v8hi &V1, __v8hi &V2, unsigned mask) {
__v8hi Result = V1;
if (mask & 0x80)
Result[0] = V2[0];
return Result;
}
llvm-svn: 285866
Michal Gorny [Wed, 2 Nov 2016 22:57:23 +0000 (22:57 +0000)]
[cmake] Build gtest from LLVM when building standalone
Include the gtest utility directory from LLVM sources when performing
a stand-alone build of LLDB. This is necessary to have a correct gtest
library to link tests against, as the one used by LLVM is not installed
(and not supposed to be). This is the same approach as used in clang.
Differential Revision: https://reviews.llvm.org/D26245
llvm-svn: 285865
Eli Friedman [Wed, 2 Nov 2016 22:32:23 +0000 (22:32 +0000)]
[Polly CodeGen] Break critical edge from RTC to original loop.
This makes polly generate a CFG which is closer to what we want
in LLVM IR, with a loop preheader for the original loop. This is
just a cleanup, but it exposes some fragile assumptions.
I'm not completely happy with the changes related to expandCodeFor;
RTCBB->getTerminator() is basically a random insertion point which
happens to work due to the way we generate runtime checks. I'm not
sure what the right answer looks like, though.
Differential Revision: https://reviews.llvm.org/D26053
llvm-svn: 285864
Rafael Espindola [Wed, 2 Nov 2016 21:39:02 +0000 (21:39 +0000)]
Simplify some typedefs. NFC.
llvm-svn: 285863
Adrian McCarthy [Wed, 2 Nov 2016 21:30:35 +0000 (21:30 +0000)]
Emit S_COMPILE3 record once per TU rather than once per function
This has some ripple effects in several tests.
llvm-svn: 285862
Malcolm Parsons [Wed, 2 Nov 2016 21:14:22 +0000 (21:14 +0000)]
[clang-tidy] Suppress notes for warnings that were ignored
Fixes PR30565.
Patch by Nikita Kakuev
llvm-svn: 285861
Kevin Enderby [Wed, 2 Nov 2016 21:08:39 +0000 (21:08 +0000)]
Add the rest of the additional error checks for invalid Mach-O files when
the offsets and sizes of an element of the Mach-O file overlaps with
another element in the Mach-O file.
Some other tests for malformed Mach-O files now run into these
checks so their tests were also adjusted.
llvm-svn: 285860
Davide Italiano [Wed, 2 Nov 2016 21:05:42 +0000 (21:05 +0000)]
[RuntimeDyld] Move an X86 only test to the correct directory.
This is an attempt to placate the bots after r285841.
llvm-svn: 285859
Dawn Perchik [Wed, 2 Nov 2016 20:57:34 +0000 (20:57 +0000)]
Fix typo which broke debugging on older OSX systems after r285172.
Reviewed by: jasonmolenda
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D26260
llvm-svn: 285858
Eli Friedman [Wed, 2 Nov 2016 20:48:11 +0000 (20:48 +0000)]
DCE math library calls with a constant operand.
On platforms which use -fmath-errno, math libcalls without any uses
require some extra checks to figure out if they are actually dead.
Fixes https://llvm.org/bugs/show_bug.cgi?id=30464 .
Differential Revision: https://reviews.llvm.org/D25970
llvm-svn: 285857
Jordan Rose [Wed, 2 Nov 2016 20:44:07 +0000 (20:44 +0000)]
Don't require nullability on template parameters in typedefs.
Previously the following code would warn on the use of "T":
template <typename T>
struct X {
typedef T *type;
};
...because nullability is /allowed/ on template parameters (because
they could be pointers). (Actually putting nullability on this use of
'T' will of course break if the argument is a non-pointer type.)
This fix doesn't handle the case where a template parameter is used
/outside/ of a typedef. That seems trickier, especially in parameter
position.
llvm-svn: 285856
Malcolm Parsons [Wed, 2 Nov 2016 20:34:10 +0000 (20:34 +0000)]
Fix Clang-tidy readability-redundant-string-cstr warnings
Reviewers: zturner, labath
Subscribers: tberghammer, danalbert, lldb-commits
Differential Revision: https://reviews.llvm.org/D26233
llvm-svn: 285855
Rui Ueyama [Wed, 2 Nov 2016 19:51:41 +0000 (19:51 +0000)]
Fix Windows buildbot.
llvm-svn: 285854
Vedant Kumar [Wed, 2 Nov 2016 19:44:13 +0000 (19:44 +0000)]
[llvm-cov] Turn line numbers in html reports into clickable links
llvm-svn: 285853
Artem Dergachev [Wed, 2 Nov 2016 19:35:20 +0000 (19:35 +0000)]
[analyzer] StdLibraryFunctions: provide platform-specific function summaries.
Because standard functions can be defined differently on different platforms,
this commit introduces a method for constructing summaries with multiple
variants, whichever matches better. It is also useful for supporting overloads.
Differential Revision: https://reviews.llvm.org/D25940
llvm-svn: 285852
Rui Ueyama [Wed, 2 Nov 2016 18:58:44 +0000 (18:58 +0000)]
Convert Out::InterpSection to In::InterpSection.
Differential Revision: https://reviews.llvm.org/D26225
llvm-svn: 285851
Rui Ueyama [Wed, 2 Nov 2016 18:42:13 +0000 (18:42 +0000)]
Reduce number of classes by merging DIHelper with ObjectFile.
DIHelper is a class having only one member, and ObjectFile has
a unique pointer to a DIHelper. So we can directly have ObjectFile
have the member.
Differential Revision: https://reviews.llvm.org/D26223
llvm-svn: 285850
Erich Keane [Wed, 2 Nov 2016 18:29:35 +0000 (18:29 +0000)]
regcall: Implement regcall Calling Conv in clang
This patch implements the register call calling convention, which ensures
as many values as possible are passed in registers. CodeGen changes
were committed in https://reviews.llvm.org/rL284108.
Differential Revision: https://reviews.llvm.org/D25204
llvm-svn: 285849
Eugene Zelenko [Wed, 2 Nov 2016 18:23:52 +0000 (18:23 +0000)]
[Documentation] Fix Clang-tidy misc-use-after-move and cert-msc50-cpp style and misspelling.
llvm-svn: 285848
Pavel Labath [Wed, 2 Nov 2016 18:06:17 +0000 (18:06 +0000)]
Remove KQueue.cpp
Summary:
This class is unused.
Reviewers: clayborg
Subscribers: mgorny, modocache, lldb-commits
Differential Revision: https://reviews.llvm.org/D26237
llvm-svn: 285847
Krzysztof Parzyszek [Wed, 2 Nov 2016 17:59:54 +0000 (17:59 +0000)]
[Hexagon] Remove registers coalesced in expand-condsets from live intervals
llvm-svn: 285846
Marshall Clow [Wed, 2 Nov 2016 17:56:05 +0000 (17:56 +0000)]
Add support for old versions of MacOS to libunwind. Fixes PR22203. Thanks to Jeremy for the bug report and the patch.
llvm-svn: 285845
Artem Tamazov [Wed, 2 Nov 2016 17:45:58 +0000 (17:45 +0000)]
[AMDGPU][mc] Improve test of special asm symbols.
Test simplified. Coverage extended.
Differential Revision: https://reviews.llvm.org/D26198
llvm-svn: 285844
Zachary Turner [Wed, 2 Nov 2016 17:42:12 +0000 (17:42 +0000)]
Fix crash in PseudoTerminal on Windows.
Patch by Rudy Pons
Differential Revision: https://reviews.llvm.org/D25681
llvm-svn: 285843
Martin Bohme [Wed, 2 Nov 2016 17:34:47 +0000 (17:34 +0000)]
[clang-tidy] Extend misc-use-after-move to support unique_ptr and shared_ptr.
Summary:
As a unique_ptr or shared_ptr that has been moved from is guaranteed to be null,
we only warn if the pointer is dereferenced.
Reviewers: hokein, alexfh, aaron.ballman
Subscribers: Prazek, cfe-commits
Differential Revision: https://reviews.llvm.org/D26041
llvm-svn: 285842
Davide Italiano [Wed, 2 Nov 2016 17:32:19 +0000 (17:32 +0000)]
[lli/COFF] Set the correct alignment for common symbols
Otherwise we set it always to zero, which is not correct,
and we assert inside alignTo (Assertion failed:
Align != 0u && "Align can't be 0.").
Differential Revision: https://reviews.llvm.org/D26173
llvm-svn: 285841
Matt Arsenault [Wed, 2 Nov 2016 17:24:54 +0000 (17:24 +0000)]
AMDGPU: Cleanup some xfailed tests
Some of these are already fixed or tested somewhere else.
llvm-svn: 285840
Chris Bieneman [Wed, 2 Nov 2016 17:19:26 +0000 (17:19 +0000)]
[CMake] Support LLDB_TEST_CLANG in check-lldb target(s)
This just hooks up the in-tree compiler to be optionally used when running the test suite.
llvm-svn: 285839
Chris Bieneman [Wed, 2 Nov 2016 17:19:23 +0000 (17:19 +0000)]
Find clang resource directory via *nix-style lookup
Summary:
This patch allows the Darwin build to fall back to to Posix-style lookups for the clang resource directory if the debugger library isn't inside a framework.
The patch also includes a bit of refactoring and cleanup around the *nix resolution of the binary and lib directories to reuse the code instead of duplicating it.
With this patch Darwin builds that don't build a framework only have 3 failing tests on my system (TestExec.py).
Reviewers: zturner, labath, spyffe, tfiala
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D26170
llvm-svn: 285838
Zachary Turner [Wed, 2 Nov 2016 17:10:55 +0000 (17:10 +0000)]
Fix build due to missing definition.
llvm-svn: 285837
Zachary Turner [Wed, 2 Nov 2016 17:05:19 +0000 (17:05 +0000)]
Add CodeViewRecordIO for reading and writing.
Using a pattern similar to that of YamlIO, this allows
us to have a single codepath for translating codeview
records to and from serialized byte streams. The
current patch only hooks this up to the reading of
CodeView type records. A subsequent patch will hook
it up for writing of CodeView type records, and then a
third patch will hook up the reading and writing of
CodeView symbols.
Differential Revision: https://reviews.llvm.org/D26040
llvm-svn: 285836
Nicolai Haehnle [Wed, 2 Nov 2016 17:03:11 +0000 (17:03 +0000)]
AMDGPU: Allow additional implicit operands on MOVRELS instructions
Summary:
The post-RA scheduler occasionally uses additional implicit operands when
the vector implicit operand as a whole is killed, but some subregisters
are still live because they are directly referenced later. Unfortunately,
this seems incredibly subtle to reproduce.
Fixes piglit spec/glsl-110/execution/variable-indexing/vs-temp-array-mat2-index-wr.shader_test
and others.
Reviewers: arsenm, tstellarAMD
Subscribers: kzhuravl, wdng, yaxunl, tony-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D25656
llvm-svn: 285835
Zachary Turner [Wed, 2 Nov 2016 16:59:42 +0000 (16:59 +0000)]
Fix some warnings compiling with clang-cl on Windows.
llvm-svn: 285834
Andrey Churbanov [Wed, 2 Nov 2016 16:45:25 +0000 (16:45 +0000)]
Change task stealing to always get task from head of victim's deque.
Differential Revision: https://reviews.llvm.org/D26187
llvm-svn: 285833
Malcolm Parsons [Wed, 2 Nov 2016 16:43:50 +0000 (16:43 +0000)]
Fix Clang-tidy readability-redundant-string-cstr warnings
Reviewers: beanz, lattner, jlebar
Subscribers: jholewinski, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D26235
llvm-svn: 285832
Marshall Clow [Wed, 2 Nov 2016 16:39:55 +0000 (16:39 +0000)]
Add conditions for PPC to libunwind. Fixes PR22200. Thanks to Jeremy for the bug report and the patch.
llvm-svn: 285831
Nirav Dave [Wed, 2 Nov 2016 16:22:51 +0000 (16:22 +0000)]
[ARM][MC] Cleanup ARM Target Assembly Parser
Summary:
Correctly parse end-of-statement tokens and handle preprocessor
end-of-line comments in ARM assembly processor.
Reviewers: rnk, majnemer
Subscribers: aemerson, rengolin, llvm-commits
Differential Revision: https://reviews.llvm.org/D26152
llvm-svn: 285830
Adrian Prantl [Wed, 2 Nov 2016 16:20:37 +0000 (16:20 +0000)]
Improve and cleanup comments in DwarfExpression.h
llvm-svn: 285829
Matt Arsenault [Wed, 2 Nov 2016 16:18:29 +0000 (16:18 +0000)]
BranchRelaxation: Fix computing indirect branch block size
llvm-svn: 285828
Adrian Prantl [Wed, 2 Nov 2016 16:12:20 +0000 (16:12 +0000)]
Simplify control flow in the the DWARF expression compiler
by refactoring common code into a DwarfExpressionCursor wrapper.
llvm-svn: 285827
Adrian Prantl [Wed, 2 Nov 2016 16:12:16 +0000 (16:12 +0000)]
Emit DW_OP_piece also if the previous value was a constant.
This fixes a bug in the DWARF backend.
llvm-svn: 285826