summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Ignore forward declarations without definitions in the same ↵Jonathan Coe2016-11-032-0/+8
| | | | | | | | | | | | | | 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
* Update for llvm change.Rafael Espindola2016-11-031-2/+2
| | | | llvm-svn: 285906
* Replace a report_fatal_error with an ErrorOr.Rafael Espindola2016-11-035-14/+21
| | | | llvm-svn: 285905
* Pass the section table around instead of recomputing it.Rafael Espindola2016-11-032-15/+20
| | | | llvm-svn: 285904
* Split getStringTableForSymtab.Rafael Espindola2016-11-031-1/+15
| | | | | | For use in cases where we already have the section table. llvm-svn: 285903
* [Renderscript] Add commands for scriptgroup interaction.Aidan Dodds2016-11-035-4/+610
| | | | | | | | | 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
* [clang-tidy] Handle data() in readability-redundant-string-cstrMalcolm Parsons2016-11-035-10/+24
| | | | | | | | | | | | | | | 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
* [ELF] - Accept both "-" and "--" for Ttext/Tdata/Tbss options.George Rimar2016-11-032-6/+6
| | | | llvm-svn: 285900
* Remove redundant calls to std::string::data()Malcolm Parsons2016-11-032-2/+2
| | | | | | | | | | Reviewers: aaron.ballman, mehdi_amini, dblaikie Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D26276 llvm-svn: 285899
* Split getSHNDXTable in two.Rafael Espindola2016-11-031-1/+14
| | | | | | Some clients already have the section table available. llvm-svn: 285898
* We already have the sections, pass them to getSHNDXTable.Rafael Espindola2016-11-031-3/+4
| | | | llvm-svn: 285897
* [ELF] Do not create interworking thunks for undefined weak references.Peter Smith2016-11-032-0/+26
| | | | | | | | | | | | | | 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
* Use globMatch() instead of llvm::regex in linker scriptsEugene Leviant2016-11-034-14/+54
| | | | | | | | | 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
* Link lldb-mi only to the llvm components it usesPavel Labath2016-11-031-4/+3
| | | | | | | | | | | | | | 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
* [Thumb] Teach ISel how to lower compares of AND bitmasks efficientlyJames Molloy2016-11-039-26/+231
| | | | | | | | | | | | | | | 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
* Fix Timer unit testPavel Labath2016-11-031-11/+8
| | | | | | | | 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
* Remove TimeSpecTimeout classPavel Labath2016-11-034-129/+0
| | | | | | the class is unused. llvm-svn: 285891
* Refactor Timer classPavel Labath2016-11-034-121/+122
| | | | | | | | | | | | | | | | | | | | | | 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
* Reverted r285882 (Enhancement to test for -ast-print)Serge Pavlov2016-11-031-3/+1
| | | | | | It broke buildbot on Windows. llvm-svn: 285889
* [ELF] - Update after LLVM change (r285886)George Rimar2016-11-031-1/+1
| | | | llvm-svn: 285888
* [tools/obj2yaml] - Update after LLVM change r285886George Rimar2016-11-031-1/+4
| | | | llvm-svn: 285887
* [Object/ELF] - Make getSymbol() return Error.George Rimar2016-11-033-2/+6
| | | | | | | | | 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
* Test for YMMRegisters.Ravitheja Addepally2016-11-033-0/+149
| | | | | | | | | | | | | | | | | 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
* [ELF] - Removed unused method declaration. NFC.George Rimar2016-11-031-1/+0
| | | | llvm-svn: 285884
* Fix heuristics skipping invalid ctor-initializers with C++11Olivier Goffart2016-11-032-14/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Enhancement to test for -ast-printSerge Pavlov2016-11-031-1/+3
| | | | | | | | | | | 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
* [CMake] Disable rpath for UnitTestsJonas Hahnfeld2016-11-032-7/+5
| | | | | | | | This was broken since rL285714. Differential Revision: https://reviews.llvm.org/D26246 llvm-svn: 285881
* [Sema] Remove a dead assignment, NFC.Vedant Kumar2016-11-031-3/+2
| | | | | | | | | | | 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
* [AVX-512] Use 'vnot' instead of 'not' in patterns involving vXi1 vectors.Craig Topper2016-11-033-71/+36
| | | | | | | | | | | | 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
* Expandload and Compressstore intrinsicsElena Demikhovsky2016-11-0312-58/+441
| | | | | | | | 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
* Pass the sections to getShtGroupSignature.Rafael Espindola2016-11-032-4/+10
| | | | | | This avoids fetching it again from the object. llvm-svn: 285875
* Split getSection in two.Rafael Espindola2016-11-031-8/+18
| | | | | | This will allow avoiding repeated error checking in a few cases. llvm-svn: 285874
* [CodeGen] Use StringRef. NFC.George Burgess IV2016-11-033-7/+7
| | | | | | | | 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
* [Sema] Allow static_cast<T&&>(e) to check explicit conversions for ↵Eric Fiselier2016-11-034-17/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [ThinLTO] Handle distributed backend case when doing renamingTeresa Johnson2016-11-033-4/+45
| | | | | | | | | | | | | | | | | | | | | | | 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
* Update manglings for C++17 noexcept function types to match Jason Merrill'sRichard Smith2016-11-033-23/+23
| | | | | | proposal on cxx-abi-dev earlier today. llvm-svn: 285870
* Teach clang-query to dump types. I couldn't find any existing tests for ↵Richard Smith2016-11-024-4/+14
| | | | | | clang-query's dumping functionality. =( llvm-svn: 285869
* [index] Fix assertion hit when handling a declaration of C++'s 'operator ↵Argyrios Kyrtzidis2016-11-023-13/+14
| | | | | | | | | | | 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
* [p0012] Implement ABI support for throwing a noexcept function pointer andRichard Smith2016-11-025-1/+208
| | | | | | | | | | | | | | | | 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
* Revert "[InstCombine] allow splat vector folds in adjustMinMax()"Greg Bedwell2016-11-022-42/+62
| | | | | | | | | | | | | | | | | 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
* [cmake] Build gtest from LLVM when building standaloneMichal Gorny2016-11-021-0/+8
| | | | | | | | | | | 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
* [Polly CodeGen] Break critical edge from RTC to original loop.Eli Friedman2016-11-0211-66/+103
| | | | | | | | | | | | | | | 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
* Simplify some typedefs. NFC.Rafael Espindola2016-11-022-16/+15
| | | | llvm-svn: 285863
* Emit S_COMPILE3 record once per TU rather than once per functionAdrian McCarthy2016-11-028-232/+87
| | | | | | This has some ripple effects in several tests. llvm-svn: 285862
* [clang-tidy] Suppress notes for warnings that were ignoredMalcolm Parsons2016-11-024-3/+25
| | | | | | | | Fixes PR30565. Patch by Nikita Kakuev llvm-svn: 285861
* Add the rest of the additional error checks for invalid Mach-O files whenKevin Enderby2016-11-0218-28/+157
| | | | | | | | | | 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
* [RuntimeDyld] Move an X86 only test to the correct directory.Davide Italiano2016-11-021-0/+0
| | | | | | This is an attempt to placate the bots after r285841. llvm-svn: 285859
* Fix typo which broke debugging on older OSX systems after r285172.Dawn Perchik2016-11-021-1/+1
| | | | | | | | Reviewed by: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D26260 llvm-svn: 285858
* DCE math library calls with a constant operand.Eli Friedman2016-11-024-0/+249
| | | | | | | | | | | 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
* Don't require nullability on template parameters in typedefs.Jordan Rose2016-11-022-1/+19
| | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud