aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-13Fix interaction between serialization and c++1z feature.Richard Trieu4-1/+13
In c++1z, static_assert is not required to have a StringLiteral message, where previously it was required. Update the AST Reader to be able to handle a null StringLiteral. llvm-svn: 281286
2016-09-13Update Clang for D20147 ("DebugInfo: New metadata representation for global ↵Peter Collingbourne31-134/+158
variables.") Differential Revision: http://reviews.llvm.org/D20415 llvm-svn: 281285
2016-09-13DebugInfo: New metadata representation for global variables.Peter Collingbourne159-796/+922
This patch reverses the edge from DIGlobalVariable to GlobalVariable. This will allow us to more easily preserve debug info metadata when manipulating global variables. Fixes PR30362. A program for upgrading test cases is attached to that bug. Differential Revision: http://reviews.llvm.org/D20147 llvm-svn: 281284
2016-09-13[DAG] Refactor BUILD_VECTOR combine to make it easier to extend. NFCI.Michael Kuperstein1-123/+156
This should make it easier to add cases that we currently don't cover, like supporting more kinds of type mismatches and more than 2 input vectors. llvm-svn: 281283
2016-09-13Fix an issue where LLDB was not masking enough bits off of objc classes ↵Enrico Granata1-1/+14
data() pointers, effectively rendering us unable to generate descriptors for some classes Fixes rdar://27758358 llvm-svn: 281282
2016-09-13X86: Conditional tail calls should not have isBarrier = 1Hans Wennborg3-21/+62
That confuses e.g. machine basic block placement, which then doesn't realize that control can fall through a block that ends with a conditional tail call. Instead, isBranch=1 should be set. Also, mark EFLAGS as used by these instructions. llvm-svn: 281281
2016-09-13Temporarily Revert "[MC] Defer asm errors to post-statement failure" as it's ↵Eric Christopher16-517/+830
causing errors on the sanitizer bots. This reverts commit r281249. llvm-svn: 281280
2016-09-13Revert "Add -fdiagnostics-show-hotness"Adam Nemet9-127/+1
This reverts commit r281276. Many bots are failing. llvm-svn: 281279
2016-09-13[DebugInfo] Deduplicate debug info limiting logicReid Kleckner3-25/+23
We should be doing the same checks when a type is completed as we do when a complete type is used during emission. Previously, we duplicated the logic, and it got out of sync. This could be observed with dllimported classes. Also reduce a test case for this slightly. Implementing review feedback from David Blaikie on r281057. llvm-svn: 281278
2016-09-12[Sema] Fix PR30346: relax __builtin_object_size checks.George Burgess IV3-11/+40
This patch makes us act more conservatively when trying to determine the objectsize for an array at the end of an object. This is in response to code like the following: ``` struct sockaddr { /* snip */ char sa_data[14]; }; void foo(const char *s) { size_t slen = strlen(s) + 1; size_t added_len = slen <= 14 ? 0 : slen - 14; struct sockaddr *sa = malloc(sizeof(struct sockaddr) + added_len); strcpy(sa->sa_data, s); // ... } ``` `__builtin_object_size(sa->sa_data, 1)` would return 14, when there could be more than 14 bytes at `sa->sa_data`. Code like this is apparently not uncommon. FreeBSD's manual even explicitly mentions this pattern: https://www.freebsd.org/doc/en/books/developers-handbook/sockets-essential-functions.html (section 7.5.1.1.2). In light of this, we now just give up on any array at the end of an object if we can't find the object's initial allocation. I lack numbers for how much more conservative we actually become as a result of this change, so I chose the fix that would make us as compatible with GCC as possible. If we want to be more aggressive, I'm happy to consider some kind of whitelist or something instead. llvm-svn: 281277
2016-09-12Add -fdiagnostics-show-hotnessAdam Nemet9-1/+127
Summary: I've recently added the ability for optimization remarks to include the hotness of the corresponding code region. This uses PGO and allows filtering of the optimization remarks by relevance. The idea was first discussed here: http://thread.gmane.org/gmane.comp.compilers.llvm.devel/98334 The general goal is to produce a YAML file with the remarks. Then, an external tool could dynamically filter these by hotness and perhaps by other things. That said it makes sense to also expose this at the more basic level where we just include the hotness info with each optimization remark. For example, in D22694, the clang flag was pretty useful to measure the overhead of the additional analyses required to include hotness. (Without the flag we don't even run the analyses.) For the record, Hal has already expressed support for the idea of this patch on IRC. Differential Revision: https://reviews.llvm.org/D23284 llvm-svn: 281276
2016-09-12Fix a long comment lineAdam Nemet1-1/+1
llvm-svn: 281275
2016-09-12[OptDiag] Add getHotness accessorAdam Nemet1-0/+1
llvm-svn: 281274
2016-09-12This is the main part of a change to add breakpoint save and restore to lldb.Jim Ingham23-255/+1859
Still to come: 1) SB API's 2) Testcases 3) Loose ends: a) serialize Thread options b) serialize Exception resolvers 4) "break list --file" should list breakpoints contained in a file and "break read -f 1 3 5" should then read in only those breakpoints. <rdar://problem/12611863> llvm-svn: 281273
2016-09-12[LVI] Complete the abstract of the cache layer [NFCI]Philip Reames1-72/+94
Convert the previous introduced is-a relationship between the LVICache and LVIImple clases into a has-a relationship and hide all the implementation details of the cache from the lazy query layer. The only slightly concerning change here is removing the addition of a queried block into the SeenBlock set in LVIImpl::getBlockValue. As far as I can tell, this was effectively dead code. I think it *used* to be the case that getCachedValueInfo wasn't const and might end up inserting elements in the cache during lookup. That's no longer true and hasn't been for a while. I did fixup the const usage to make that more obvious. llvm-svn: 281272
2016-09-12[CMake] Fix linker-as-ld to symlink instead of copy lldChris Bieneman1-2/+2
Summary: This test fails if you're building with BUILD_SHARED_LIBS because the LLVM libraries are found via @rpath. Symlinking instead of copying should be sufficiently robust for the test case. Reviewers: llvm-commits Subscribers: davide Differential Revision: https://reviews.llvm.org/D24476 llvm-svn: 281271
2016-09-12add more tests for PR30273Sanjay Patel1-2/+32
llvm-svn: 281270
2016-09-12[ORC] Clang-format RPCSerialization.h.Lang Hames1-29/+26
llvm-svn: 281269
2016-09-12[ORC] Add some more documentation to RPCSerialization.h.Lang Hames1-21/+58
llvm-svn: 281268
2016-09-12[LVI] Sink a couple more cache manipulation routines into the cache itself ↵Philip Reames1-36/+45
[NFCI] The only interesting bit here is the refactor of the handle callback and even that's pretty straight-forward. llvm-svn: 281267
2016-09-12[LVI] Abstract out the actual cache logic [NFCI]Philip Reames1-89/+97
Seperate the caching logic from the implementation of the lazy analysis. For the moment, the lazy analysis impl has a is-a relationship with the cache; this will change to a has-a relationship shortly. This was done as two steps merely to keep the changes simple and the diff understandable. llvm-svn: 281266
2016-09-12Add comments.Rui Ueyama2-0/+7
llvm-svn: 281265
2016-09-12config: Use _LIBCPP_TYPE_VIS_ONLY with enum classShoaib Meenai1-1/+1
An enum class has associated type info. In the Microsoft ABI, type info is emitted in the COMDAT section and isn't exported, so clang rightfully complains about __declspec(dllexport) being unused for an enum class. On other platforms, we still want to export the type info. Differential Revision: https://reviews.llvm.org/D24065 llvm-svn: 281264
2016-09-12Revert r281215, it caused PR30358.Nico Weber9-232/+26
llvm-svn: 281263
2016-09-12attempt to unbreak build after r281254Nico Weber1-0/+1
llvm-svn: 281262
2016-09-12CodeGen: use some range-based for loopsSaleem Abdulrasool1-14/+10
Use range-based for loops to simplify the logic. Add an explicit check for MachO as the inline asm uses MachO specific directives. llvm-svn: 281261
2016-09-12[MachO] Factor out a fair amount of duplicated code. NFCI.Davide Italiano1-26/+14
llvm-svn: 281260
2016-09-12Add a couple of test files missed in r281258.Richard Smith2-0/+10
llvm-svn: 281259
2016-09-12[modules] When we merge two definitions of a function, mark the retainedRichard Smith6-24/+62
definition as visible in the discarded definition's module, as we do for other kinds of definition. llvm-svn: 281258
2016-09-12[ORC] Add missing <thread> header to RPCSerialization.h.Lang Hames1-0/+1
llvm-svn: 281257
2016-09-12[Cmake] Use Cmake's default RPATH for unittest.Davide Italiano1-0/+2
Similarly to what was done in r280791 for llvm/. This should fix a bunch of failures I saw while trying a BUILD_SHARED_LIBS build on MacOS. Still there are some failures, but this is a step forward. Thanks a lot to Chris Bieneman for the suggested fix (in PR30345) llvm-svn: 281256
2016-09-12[sanitizer] replace CHECK with CHECK_XY in two places for better diagnosticsKostya Serebryany1-2/+2
llvm-svn: 281255
2016-09-12[ORC] Replace the serialize/deserialize function pair with a SerializationTraitsLang Hames4-167/+360
class. SerializationTraits provides serialize and deserialize methods corresponding to the earlier functions, but also provides a name for the type. In future, this name will be used to render function signatures as strings, which will in turn be used to negotiate and verify API support between RPC clients and servers. llvm-svn: 281254
2016-09-12Fix the bug introduced in r281252.Dehao Chen1-1/+1
llvm-svn: 281253
2016-09-12Lower consecutive select instructions correctly.Dehao Chen2-23/+119
Summary: If consecutive select instructions are lowered separately in CGP, it will introduce redundant condition check and branches that cannot be removed by later optimization phases. This patch lowers all consecutive select instructions at the same to to avoid inefficent code as demonstrated in https://llvm.org/bugs/show_bug.cgi?id=29095 Reviewers: davidxl Subscribers: vsk, llvm-commits Differential Revision: https://reviews.llvm.org/D24147 llvm-svn: 281252
2016-09-12xfail TestQueues.py and TestDarwinLogFilterMatchMessage.pyTodd Fiala2-0/+9
It looks like the message-content-retrieval aspect of DarwinLog support is flaky, not just the regex match against it. Slightly less frequently than the regex matching, I am seeing the direct string-match variant of log-message-content matching also fail. Tracked by: llvm.org/pr30299 rdar://28237450 llvm-svn: 281251
2016-09-12config: Fix typo in commentShoaib Meenai1-1/+1
Testing commit access. NFC. llvm-svn: 281250
2016-09-12[MC] Defer asm errors to post-statement failureNirav Dave16-830/+517
Allow errors to be deferred and emitted as part of clean up to simplify and shorten Assembly parser code. This will allow error messages to be emitted in helper functions and be modified by the caller which has better context. As part of this many minor cleanups to the Parser: * Unify parser cleanup on error * Add Workaround for incorrect return values in ParseDirective instances * Tighten checks on error-signifying return values for parser functions and fix in-tree TargetParsers to be more consistent with the changes. * Fix AArch64 test cases checking for spurious error messages that are now fixed. These changes should be backwards compatible with current Target Parsers so long as the error status are correctly returned in appropriate functions. Reviewers: rnk, majnemer Subscribers: aemerson, jyknight, llvm-commits Differential Revision: https://reviews.llvm.org/D24047 llvm-svn: 281249
2016-09-12[InstCombine] add test for PR30327Sanjay Patel1-0/+14
llvm-svn: 281248
2016-09-12[InstCombine] regenerate checksSanjay Patel1-4/+7
llvm-svn: 281247
2016-09-12AVX-512: Added a test for -O0 mode. NFC.Elena Demikhovsky1-0/+52
llvm-svn: 281246
2016-09-12Fix bitmask upper bounds checkJonathan Peyton3-25/+18
Rather than checking KMP_CPU_SETSIZE, which doesn't exist when using Hwloc, we use the get_max_proc() function which can vary based on the operating system. For example on Windows with multiple processor groups, it might be the case that the highest bit possible in the bitmask is not equal to the number of hardware threads on the machine but something higher than that. Differential Revision: https://reviews.llvm.org/D24206 llvm-svn: 281245
2016-09-12AVX-512: Simplified masked_gather_scatter test. NFC.Elena Demikhovsky1-183/+6
llvm-svn: 281244
2016-09-12fix Xcode build after r281226Todd Fiala1-1/+1
llvm-svn: 281243
2016-09-12Remove -fvisibility=hidden and FORCE_STATIC.Michael Kruse2-21/+6
The flag -fvisibility=hidden flag was used for the integrated Integer Set Library (and PPCG) to keep their definitions local to Polly. The motivation was the be loaded into a DragonEgg-powered GCC, where GCC might itself use ISL for its Graphite extension. The symbols of Polly's ISL and GCC's ISL would clash. The DragonEgg project is not actively developed anymore, but Polly's unittests need to call ISL functions to set up a testing environment. Unfortunately, the -fvisibility=hidden flag means that the ISL symbols are not available to the gtest executable as it resides outside of libPolly when linked dynamically. Currently, CMake links a second copy of ISL into the unittests which leads to subtle bugs. What got observed is that two isl_ids for isl_id_none exist, one for each library instance. Because isl_id's are compared by address, isl_id_none could happen to be different from isl_id_none, depending on which library instance set the address and does the comparison. Also remove the FORCE_STATIC flag which was introduced to keep the ISL symbols visible inside the same libPolly shared object, even when build with BUILD_SHARED_LIBS. Differential Revision: https://reviews.llvm.org/D24460 llvm-svn: 281242
2016-09-12Diagnostics reference: "error:" should be red, not orange.Richard Smith2-2/+2
llvm-svn: 281241
2016-09-12Fix test failure in r281232Hemant Kulkarni2-0/+0
llvm-svn: 281240
2016-09-12[SE] Clean up device and host memory slicesJason Henline4-22/+35
Summary: * Add LLVM_ATTRIBUTE_UNUSED_RESULT used to slicing methods in order to emphasize that the slicing is not done in place. * Change device memory slice function name from `drop_front` to `slice` in order to match the naming convention of `llvm::ArrayRef` and host memory slice. * Change the parameter names of host memory slice functions to `DropCount` and `TakeCount` to match device memory slice declarations. Reviewers: jlebar Subscribers: jprice, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24464 llvm-svn: 281239
2016-09-12[MCJIT] Fix some inconsistent handling of name mangling inside MCJIT.Lang Hames2-12/+21
This patch moves symbol mangling from findSymbol to getSymbolAddress. The findSymbol, findExistingSymbol and findModuleForSymbol methods now always take a mangled name, allowing the 'demangle-and-retry' cruft to be removed from findSymbol. See http://llvm.org/PR28699 for details. Patch by James Holderness. Thanks very much James! llvm-svn: 281238
2016-09-12[asan] Ease dealing with tagged enum ErrorDescription with some macros.Filipe Cabecinhas1-32/+27
Summary: Added a macro to enumerate the (error name, error member name) pairs. This way, when adding an error, we only need to add the pair to one place (plus add its implementation, or course). Reviewers: kcc, samsonov Subscribers: llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D23875 llvm-svn: 281237