summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* A brief outline of the packets that need to be implementedJason Molenda2018-12-151-0/+375
| | | | | | | | | | to write an lldb platform server that doesn't link against LLDB.framework to be able to fully run the lldb testsuite on a remote system. The platform packets weren't covered in the existing lldb-gdb-remote.txt doc, so I wanted to jot them down in one place. llvm-svn: 349231
* Move static analyzer core diagnostics to common.Richard Trieu2018-12-153-6/+6
| | | | llvm-svn: 349230
* [analyzer] Fix unknown block calls to have zero parameters.Artem Dergachev2018-12-152-2/+11
| | | | | | | | | | | | Right now they report to have one parameter with null decl, because initializing an ArrayRef of pointers with a nullptr yields an ArrayRef to an array of one null pointer. Fixes a crash in the OSObject section of RetainCountChecker. Differential Revision: https://reviews.llvm.org/D55671 llvm-svn: 349229
* [analyzer] ObjCDealloc: Fix a crash when a class attempts to deallocate a class.Artem Dergachev2018-12-152-1/+18
| | | | | | | | | | | | | | | | | | The checker wasn't prepared to see the dealloc message sent to the class itself rather than to an instance, as if it was +dealloc. Additionally, it wasn't prepared for pure-unknown or undefined self values. The new guard covers that as well, but it is annoying to test because both kinds of values shouldn't really appear and we generally want to get rid of all of them (by modeling unknown values with symbols and by warning on use of undefined values before they are used). The CHECK: directive for FileCheck at the end of the test looks useless, so i removed it. Differential Revision: https://reviews.llvm.org/D55680 llvm-svn: 349228
* [analyzer] ObjCContainers: Track index values.Artem Dergachev2018-12-152-9/+47
| | | | | | | | | | | | Use trackExpressionValue() (previously known as trackNullOrUndefValue()) to track index value in the report, so that the user knew what Static Analyzer thinks the index is. Additionally, implement printState() to help debugging the checker later. Differential Revision: https://reviews.llvm.org/D55458 llvm-svn: 349227
* [analyzer] MoveChecker: Add checks for dereferencing a smart pointer after move.Artem Dergachev2018-12-152-56/+178
| | | | | | | | | | | | | | | | | | | Calling operator*() or operator->() on a null STL smart pointer is undefined behavior. Smart pointers are specified to become null after being moved from. So we can't warn on arbitrary method calls, but these two operators definitely make no sense. The new bug is fatal because it's an immediate UB, unlike other use-after-move bugs. The work on a more generic null smart pointer dereference checker is still pending. Differential Revision: https://reviews.llvm.org/D55388 llvm-svn: 349226
* [analyzer] MoveChecker: NFC: De-duplicate a few checks.Artem Dergachev2018-12-151-82/+88
| | | | | | | | No functional change intended. Differential Revision: https://reviews.llvm.org/D55387 llvm-svn: 349225
* [SILoadStoreOptimizer] Use std::abs to avoid truncation.Florian Hahn2018-12-151-2/+2
| | | | | | | | | | | | | | Using regular abs() causes the following warning error: absolute value function 'abs' given an argument of type 'int64_t' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value] (uint32_t)abs(Dist) > MaxDist) { ^ lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:1369:19: note: use function 'std::abs' instead which causes a bot to fail: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/18284/steps/bootstrap%20clang/logs/stdio llvm-svn: 349224
* [X86] Rename hasNoSignedComparisonUses to hasNoSignFlagUses. Add the ↵Craig Topper2018-12-151-8/+14
| | | | | | | | | | instruction that only modify the O flag to the waiver list. The only caller of this turns CMP with 0 into TEST. CMP with 0 and TEST both set OF to 0 so we should have no issues with instructions that only use OF. Though I don't think there's any reason we would read just OF after a compare with 0 anyway. So this probably isn't an observable change. llvm-svn: 349223
* [X86] Make hasNoCarryFlagUses/hasNoSignedComparisonUses take an SDValue that ↵Craig Topper2018-12-151-20/+19
| | | | | | | | | | | | indicates which result is the flag result. NFCI hasNoCarryFlagUses hardcoded that the flag result is 1 and used that to filter which uses were of interest. hasNoSignedComparisonUses just assumes the only result is flags and checks whether any user of the node is a CopyToReg instruction. After this patch we now do a result number check in both and rely on the caller to provide the result number. This shouldn't change behavior it was just an odd difference between the two functions that I noticed. llvm-svn: 349222
* [WebAssembly] Check if the section order is correctHeejin Ahn2018-12-157-16/+169
| | | | | | | | | | | | | | | | | | | | Summary: This patch checks if the section order is correct when reading a wasm object file in `WasmObjectFile` and converting YAML to wasm object in yaml2wasm. (It is not possible to check when reading YAML because it is handled exclusively by the YAML reader.) This checks the ordering of all known sections (core sections + known custom sections). This also adds section ID DataCount section that will be scheduled to be added in near future. Reviewers: sbc100 Subscribers: dschuff, mgorny, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54924 llvm-svn: 349221
* [NewGVN] Update use counts for SSA copies when replacing them by their operands.Florian Hahn2018-12-152-4/+88
| | | | | | | | | | | | | | | | | | The current code relies on LeaderUseCount to determine if we can remove an SSA copy, but in that the LeaderUseCount does not refer to the SSA copy. If a SSA copy is a dominating leader, we use the operand as dominating leader instead. This means we removed a user of a ssa copy and we should decrement its use count, so we can remove the ssa copy once it becomes dead. Fixes PR38804. Reviewers: efriedma, davide Reviewed By: davide Differential Revision: https://reviews.llvm.org/D51595 llvm-svn: 349217
* ELF: Handle R_ARM_V4BX correctly in PIC output files.Peter Collingbourne2018-12-152-6/+8
| | | | | | | | | | | | | | | Previously we considered R_ARM_V4BX to be an absolute relocation, which meant that we rejected it in read-only sections in PIC output files. Instead, treat it as a hint relocation so that relocation processing ignores it entirely. Also fix a problem with the test case where it was never being run because it has a .yaml extension and we don't run tests with that extension. Differential Revision: https://reviews.llvm.org/D55728 llvm-svn: 349216
* Simplify Boolean expressionsJonas Devlieghere2018-12-15177-1018/+599
| | | | | | | | | | | This patch simplifies boolean expressions acorss LLDB. It was generated using clang-tidy with the following command: run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD Differential revision: https://reviews.llvm.org/D55584 llvm-svn: 349215
* [Util] Refer to [s|z]exts of args when converting dbg.declares (fix PR35400)Vedant Kumar2018-12-152-32/+9
| | | | | | | | | | | | | | | | | | When converting dbg.declares, if the described value is a [s|z]ext, refer to the ext directly instead of referring to its operand. This fixes a narrowing bug (the debugger got the sign of a variable wrong, see llvm.org/PR35400). The main reason to refer to the ext's operand was that an optimization may remove the ext itself, leading to a dropped variable. Now that InstCombine has been taught to use replaceAllDbgUsesWith (r336451), this is less of a concern. Other passes can/should adopt this API as needed to fix dropped variable bugs. Differential Revision: https://reviews.llvm.org/D51813 llvm-svn: 349214
* [NVPTX] Lower instructions that expand into libcalls.Artem Belevich2018-12-142-4/+17
| | | | | | | | | | | | | | | | | | | The change is an effort to split and refactor abandoned D34708 into smaller parts. Here the behaviour of unsupported instructions is changed to match the behaviour of explicit intrinsics calls. Currently LLVM crashes with: > Assertion getInstruction() && "Not a call or invoke instruction!" failed. With this patch LLVM produces a more sensible error message: > Cannot select: ... i32 = ExternalSymbol'__foobar' Author: Denys Zariaiev <denys.zariaiev@gmail.com> Differential Revision: https://reviews.llvm.org/D55145 llvm-svn: 349213
* Mangle calling conventions into function pointer types where GCC doesReid Kleckner2018-12-143-5/+97
| | | | | | | | | | | | | | | | | | | | Summary: GCC 5.1 began mangling these Windows calling conventions into function types, since they can be used for overloading. They've always been mangled in the MS ABI, but they are new to the Itanium mangler. Note that the calling convention doesn't appear as part of the main declaration, it only appears on function parameter types and other types. Fixes PR39860 Reviewers: rjmccall, efriedma Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55672 llvm-svn: 349212
* Fix the unittests for the move of Listener & BroadcasterJim Ingham2018-12-141-2/+2
| | | | | | from Core to Utility. llvm-svn: 349211
* [libFuzzer] make len_control less aggressiveKostya Serebryany2018-12-141-1/+1
| | | | llvm-svn: 349210
* Add AddressSpace mangling to MS modeErich Keane2018-12-142-4/+123
| | | | | | | | | | | | All of the symbols demangle on llvm-undname and demangler.com. This address space qualifier is useful for when we want to use opencl C++ in Windows mode. Additionally, C++ address-space using functions will now be usable on windows. Differential Revision: https://reviews.llvm.org/D55715 Change-Id: Ife4506613c3cce778a783456d62117fbf7d83c26 llvm-svn: 349209
* Update a comment according to r255360 "Remove -r and -R options from dotest.py"Tatyana Krasnukha2018-12-141-2/+1
| | | | llvm-svn: 349208
* DebugInfo: Avoid using split DWARF when the split unit would be empty.David Blaikie2018-12-147-68/+80
| | | | | | | | | | | | | | | | | | | | | In ThinLTO many split CUs may be effectively empty because of the lack of support for cross-unit references in split DWARF. Using a split unit in those cases is just a waste/overhead - and turned out to be one contributor to a significant symbolizer performance issue when global variable debug info was being imported (see r348416 for the primary fix) due to symbolizers seeing CUs with no ranges, assuming there might still be addresses covered and walking into the split CU to see if there are any ranges (when that split CU was in a DWP file, that meant loading the DWP and its index, the index was extra large because of all these fractured/empty CUs... and so was very expensive to load). (the 3rd fix which will follow, is to assume that a CU with no ranges is empty rather than merely missing its CU level range data - and to not walk into its DIEs (split or otherwise) in search of address information that is generally not present) llvm-svn: 349207
* Revert "Add extension to always default-initialize nullptr_t."Erich Keane2018-12-144-24/+12
| | | | | | | | | This reverts commit 46efdf2ccc2a80aefebf8433dbf9c7c959f6e629. Richard Smith commented just after I submitted this that this is the wrong solution. Reverting so that I can fix differently. llvm-svn: 349206
* [codeview] Add begin/endSymbolRecord helpers, NFCReid Kleckner2018-12-142-138/+84
| | | | | | | Previously beginning a symbol record was excessively verbose. Now it's a bit simpler. This follows the same pattern as begin/endCVSubsection. llvm-svn: 349205
* [test] Capture stderr from 'tar --version' call as wellMichal Gorny2018-12-141-3/+6
| | | | | | | | | | | Capture the stderr from 'tar --version' call as otherwise error messages spill onto user's terminal unnecessarily (e.g. on NetBSD where tar does not support long options). While at it, refactor the code to use communicate() instead of reinventing the wheel. Differential Revision: https://reviews.llvm.org/D55443 llvm-svn: 349204
* DebugInfo: Move addAddrBase from DwarfUnit to DwarfCompileUnitDavid Blaikie2018-12-144-12/+12
| | | | | | Only CUs need an address table reference. llvm-svn: 349203
* [Hexagon] Add patterns for shifts of v2i16Krzysztof Parzyszek2018-12-142-0/+28
| | | | | | This fixes https://llvm.org/PR39983. llvm-svn: 349202
* Add extension to always default-initialize nullptr_t.Erich Keane2018-12-144-12/+24
| | | | | | | | | | | | | | | | | Core issue 1013 suggests that having an uninitialied std::nullptr_t be UB is a bit foolish, since there is only a single valid value. This DR reports that DR616 fixes it, which does so by making lvalue-to-rvalue conversions from nullptr_t be equal to nullptr. However, just implementing that results in warnings/etc in many places. In order to fix all situations where nullptr_t would seem uninitialized, this patch instead (as an otherwise transparent extension) default initializes uninitialized VarDecls of nullptr_t. Differential Revision: https://reviews.llvm.org/D53713 Change-Id: I84d72a9290054fa55341e8cbdac43c8e7f25b885 llvm-svn: 349201
* [GlobalISel] LegalizerHelper: Implement fewerElementsVector for G_LOAD/G_STOREVolkan Keles2018-12-143-41/+98
| | | | | | | | | | | | Reviewers: aemerson, dsanders, bogner, paquette, aditya_nandakumar Reviewed By: dsanders Subscribers: rovka, kristof.beyls, javed.absar, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D53728 llvm-svn: 349200
* [Hexagon] Use IMPLICIT_DEF to any-extend 32-bit values to 64 bitsKrzysztof Parzyszek2018-12-141-23/+25
| | | | llvm-svn: 349199
* Add --plugin-opt=emit-llvm option.Rui Ueyama2018-12-145-0/+31
| | | | | | | | | | | | | | `--plugin-opt=emit-llvm` is an option for LTO. It makes the linker to combine all bitcode files and write the result to an output file without doing codegen. Gold LTO plugin has this option. This option is being used for some post-link code analysis tools that have to see a whole program but don't need to see them in the native machine code. Differential Revision: https://reviews.llvm.org/D55717 llvm-svn: 349198
* Using llvm::find_if() instead of a range-based for loop; NFC.Aaron Ballman2018-12-141-12/+9
| | | | | | This addresses post-commit review feedback from r349188. llvm-svn: 349197
* [AMDGPU] Promote constant offset to the immediate by finding a new base with ↵Farhana Aleen2018-12-144-1/+1001
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 13bit constant offset from the nearby instructions. Summary: Promote constant offset to immediate by recomputing the relative 13bit offset from nearby instructions. E.g. s_movk_i32 s0, 0x1800 v_add_co_u32_e32 v0, vcc, s0, v2 v_addc_co_u32_e32 v1, vcc, 0, v6, vcc s_movk_i32 s0, 0x1000 v_add_co_u32_e32 v5, vcc, s0, v2 v_addc_co_u32_e32 v6, vcc, 0, v6, vcc global_load_dwordx2 v[5:6], v[5:6], off global_load_dwordx2 v[0:1], v[0:1], off => s_movk_i32 s0, 0x1000 v_add_co_u32_e32 v5, vcc, s0, v2 v_addc_co_u32_e32 v6, vcc, 0, v6, vcc global_load_dwordx2 v[5:6], v[5:6], off global_load_dwordx2 v[0:1], v[5:6], off offset:2048 Author: FarhanaAleen Reviewed By: arsenm, rampitec Subscribers: llvm-commits, AMDGPU Differential Revision: https://reviews.llvm.org/D55539 llvm-svn: 349196
* [Clang] Add __builtin_launderEric Fiselier2018-12-1410-1/+558
| | | | | | | | | | | | | | | | | Summary: This patch adds `__builtin_launder`, which is required to implement `std::launder`. Additionally GCC provides `__builtin_launder`, so thing brings Clang in-line with GCC. I'm not exactly sure what magic `__builtin_launder` requires, but based on previous discussions this patch applies a `@llvm.invariant.group.barrier`. As noted in previous discussions, this may not be enough to correctly handle vtables. Reviewers: rnk, majnemer, rsmith Reviewed By: rsmith Subscribers: kristina, Romain-Geissler-1A, erichkeane, amharc, jroelofs, cfe-commits, Prazek Differential Revision: https://reviews.llvm.org/D40218 llvm-svn: 349195
* Remove the Disassembly benchmarks.Adrian Prantl2018-12-143-355/+0
| | | | | | | | | | | | While I was out hunting for remaining pexpect-based tests, I came across these tests that can't possibly work an any modern system, as they rely on having gdb available in /Developer. This patch simply removes the test without replacement. Differential Revision: https://reviews.llvm.org/D55559 llvm-svn: 349194
* Add missing includes and forward decls to unbreak buildEric Fiselier2018-12-141-1/+3
| | | | llvm-svn: 349193
* [OPENMP][NVPTX]Improved interwarp copy function.Alexey Bataev2018-12-143-61/+33
| | | | | | | | | Inlined runtime with the current implementation of the interwarp copy function leads to the undefined behavior because of the not quite correct implementation of the barriers. Start using generic __kmpc_barier function instead of the custom made barriers. llvm-svn: 349192
* [analyzer] MoveChecker Pt.6: Suppress the warning for the move-safe STL classes.Artem Dergachev2018-12-144-58/+97
| | | | | | | | | | | Some C++ standard library classes provide additional guarantees about their state after move. Suppress warnings on such classes until a more precise behavior is implemented. Warnings for locals are not suppressed anyway because it's still most likely a bug. Differential Revision: https://reviews.llvm.org/D55307 llvm-svn: 349191
* [analyzer] MoveChecker: Improve invalidation policies.Artem Dergachev2018-12-142-20/+75
| | | | | | | | | | | | | | | | | If a moved-from object is passed into a conservatively evaluated function by pointer or by reference, we assume that the function may reset its state. Make sure it doesn't apply to const pointers and const references. Add a test that demonstrates that it does apply to rvalue references. Additionally, make sure that the object is invalidated when its contents change for reasons other than invalidation caused by evaluating a call conservatively. In particular, when the object's fields are manipulated directly, we should assume that some sort of reset may be happening. Differential Revision: https://reviews.llvm.org/D55289 llvm-svn: 349190
* Tolerate Clangs new static_assert messagesEric Fiselier2018-12-146-6/+6
| | | | llvm-svn: 349189
* Update our SARIF support from 10-10 to 11-28.Aaron Ballman2018-12-143-54/+105
| | | | | | | | | | | | | Functional changes include: * The run.files property is now an array instead of a mapping. * fileLocation objects now have a fileIndex property specifying the array index into run.files. * The resource.rules property is now an array instead of a mapping. * The result object was given a ruleIndex property that is an index into the resource.rules array. * rule objects now have their "id" field filled out in addition to the name field. * Updated the schema and spec version numbers to 11-28. llvm-svn: 349188
* [libcxx] Mark some tests as still failing on macosx10.14Louis Dionne2018-12-143-0/+3
| | | | llvm-svn: 349187
* [SDAG] Ignore chain operand in REG_SEQUENCE when emitting instructionsKrzysztof Parzyszek2018-12-141-0/+4
| | | | llvm-svn: 349186
* [AArch64] Simplify the scheduling predicates (NFC)Evandro Menezes2018-12-142-17/+21
| | | | | | | The instruction encodings make it unnecessary to distinguish extended W-form from X-form instructions. llvm-svn: 349185
* [TransformWarning] Do not warn missed transformations in optnone functions.Michael Kruse2018-12-142-0/+55
| | | | | | | | | | | | | | | Optimization transformations are intentionally disabled by the 'optnone' function attribute. Therefore do not warn if transformation metadata is still present. Using the legacy pass manager structure, the `skipFunction` method takes care for the optnone attribute (already called before this patch). For the new pass manager, there is no equivalent, so we check for the 'optnone' attribute manually. Differential Revision: https://reviews.llvm.org/D55690 llvm-svn: 349184
* Add missing .dmp files to test inputs.Greg Clayton2018-12-141-0/+3
| | | | llvm-svn: 349183
* Cache memory regions in ProcessMinidump and use the linux maps as the source ↵Greg Clayton2018-12-1413-106/+456
| | | | | | | | | | | | | | | | | | | | | | | of the information if available Breakpad creates minidump files that sometimes have: - linux maps textual content - no MemoryInfoList Right now unless the file has a MemoryInfoList we get no region information. This patch: - reads and caches the memory region info one time and sorts it for easy subsequent access - get the region info from the best source in this order: - linux maps info (if available) - MemoryInfoList (if available) - MemoryList or Memory64List - returns memory region info for the gaps between regions (before the first and after the last) Differential Revision: https://reviews.llvm.org/D55522 llvm-svn: 349182
* When resolving a merge conflict, I put something inside an #ifdef. Fixed.Marshall Clow2018-12-141-1/+1
| | | | llvm-svn: 349181
* Fix Xcode project for MIPS architecture plug-in and move of Event, Listener ↵Greg Clayton2018-12-141-18/+41
| | | | | | and Broadcaster to Utility. llvm-svn: 349180
* [x86] add tests for extractelement of FP binops; NFCSanjay Patel2018-12-141-0/+85
| | | | llvm-svn: 349179
OpenPOWER on IntegriCloud