summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a sanity check for inline testcases.Adrian Prantl2018-02-262-0/+10
| | | | | | | | | | | When writing an inline test, there is no way to make sure that any of the inline commands are actually executed, so this patch adds a sanity check that at least one breakpoint was hit. This avoids a test with no breakpoints being hit passing. Differential Revision: https://reviews.llvm.org/D43694 llvm-svn: 326140
* Revert r326134 due to broken buildbotEd Maste2018-02-261-8/+0
| | | | llvm-svn: 326139
* [ValueTracking] Teach cannotBeOrderedLessThanZeroImpl to handle vector ↵Craig Topper2018-02-262-4/+20
| | | | | | | | | | | | | | | | constants. Summary: This allows vector fabs to be removed in more cases. Reviewers: spatel, arsenm, RKSimon Reviewed By: spatel Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43739 llvm-svn: 326138
* Keep flags from phantom synthetic sections.Rafael Espindola2018-02-266-30/+69
| | | | | | | | | | | | | | | | | | | | | This fixes pr36475. I think this code can be simplified a bit, but I would like to check in the more direct fix if we are in agreement on the direction and then refactor. This is not something that bfd does. The issue is not noticed in bfd because it keeps fewer sections from the linkerscript in the output. The reasons why it seems reasonable to do this: - As George noticed, we would still keep the flags if the output section had both an empty synthetic section and a regular section - We need an heuristic to find the flags of output sections. Using the flags of a synthetic section that would have been there seems a reasonable heuristic. llvm-svn: 326137
* [analyzer] Exploration strategy prioritizing unexplored nodes firstGeorge Karpenkov2018-02-265-0/+69
| | | | | | | | | | | | | | See D42775 for discussion. Turns out, just exploring nodes which weren't explored first is not quite enough, as e.g. the first quick traversal resulting in a report can mark everything as "visited", and then subsequent traversals of the same region will get all the pitfalls of DFS. Priority queue-based approach in comparison shows much greater increase in coverage and even performance, without sacrificing memory. Differential Revision: https://reviews.llvm.org/D43354 llvm-svn: 326136
* [analyzer] Do not analyze bison-generated filesGeorge Karpenkov2018-02-262-37/+74
| | | | | | | | | | | | | | | | | | | | | Bison/YACC generated files result in a very large number of (presumably) false positives from the analyzer. These false positives are "true" in a sense of the information analyzer sees: assuming that the lexer can return any token at any point a number of uninitialized reads does occur. (naturally, the analyzer can not capture a complex invariant that certain tokens can only occur under certain conditions). Current fix simply stops analysis on those files. I have examined a very large number of such auto-generated files, and they do all start with such a comment. Conversely, user code is very unlikely to contain such a comment. rdar://33608161 Differential Revision: https://reviews.llvm.org/D43421 llvm-svn: 326135
* Mark test_*int*_t_dwarf as failing on FreeBSDEd Maste2018-02-261-0/+8
| | | | | | | | | | Further investigation required; tests will be enabled on the buildbot worker soon. Marking failing tests for now in order to start with a green buildbot while investigation takes place. llvm.org/pr36527 llvm-svn: 326134
* [X86][SSE] Reduce FADD/FSUB/FMUL costs on later targets (PR36280)Simon Pilgrim2018-02-268-231/+224
| | | | | | | | | | Agner's tables indicate that for SSE42+ targets (Core2 and later) we can reduce the FADD/FSUB/FMUL costs down to 1, which should fix the Himeno benchmark. Note: the AVX512 FDIV costs look rather dodgy, but this isn't part of this patch. Differential Revision: https://reviews.llvm.org/D43733 llvm-svn: 326133
* [asan] Intercept std::rethrow_exception indirectlyVitaly Buka2018-02-263-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes Bug 32434 See https://bugs.llvm.org/show_bug.cgi?id=32434 Short summary: std::rethrow_exception does not use __cxa_throw to rethrow the exception, so if it is called from uninstrumented code, it will leave the stack poisoned. This can lead to false positives. Long description: For functions which don't return normally (e.g. via exceptions), asan needs to unpoison the entire stack. It is not known before a call to such a function where execution will continue, some function which don't contain cleanup code like destructors might be skipped. After stack unwinding, execution might continue in uninstrumented code. If the stack has been poisoned before such a function is called, but the stack is unwound during the unconventional return, then zombie redzones (entries) for no longer existing stack variables can remain in the shadow memory. Normally, this is avoided by asan generating a call to asan_handle_no_return before all functions marked as [[noreturn]]. This asan_handle_no_return unpoisons the entire stack. Since these [[noreturn]] functions can be called from uninstrumented code, asan also introduces interceptor functions which call asan_handle_no_return before running the original [[noreturn]] function; for example, cxa_throw is intercepted. If a [[noreturn]] function is called from uninstrumented code (so the stack is left poisoned) and additionally, execution continues in uninstrumented code, new stack variables might be introduced and overlap with the stack variables which have been removed during stack unwinding. Since the redzones are not cleared nor overwritten by uninstrumented code, they remain but now contain invalid data. Now, if the redzones are checked against the new stack variables, false positive reports can occur. This can happen for example by the uninstrumented code calling an intercepted function such as memcpy, or an instrumented function. Intercepting std::rethrow_exception directly is not easily possible since it depends on the C++ standard library implementation (e.g. libcxx vs libstdc++) and the mangled name it produces for this function. As a rather simple workaround, we're intercepting _Unwind_RaiseException for libstdc++. For libcxxabi, we can intercept the ABI function __cxa_rethrow_primary_exception. Patch by Robert Schneider. Reviewers: kcc, eugenis, alekseyshl, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42644 llvm-svn: 326132
* Revert "[analyzer] Quickfix: do not overflow in calculating offset in ↵George Karpenkov2018-02-263-60/+1
| | | | | | | | | | RegionManager" This reverts commit df306c4c5ab4a6b8d3c47432346d1f9b90c328b4. Reverting until I can figured out the reasons for failures. llvm-svn: 326131
* Partial fix for TestConflictingSymbol.py on WindowsAdrian McCarthy2018-02-263-4/+4
| | | | | | | | | | | | | | | | | Without this fix, the test ERRORs because the link of the inferior fails. This patch adds the LLDB_TEST_API macro where needed and uses the new -2 magic value for num_expected_locations to account for lazy-loading of module symbols on Windows. With this fix, the test itself still fails: conflicting_symbol isn't in the debug info nor the export table, and Windows binaries don't have an equivalent of the ELF .symtab. We need to understand why the test works to keep the symbol out of the debug info. In the mean time, having the test fail at this point is a better indication of the remaining problem than a build error. Differential Revision: https://reviews.llvm.org/D43688 llvm-svn: 326130
* [DebugInfo] Remove target-specific instructions in testScott Linder2018-02-261-2/+0
| | | | | | | This AsmParser test is target-agnostic, but contained some target-specific instructions, which broke on SystemZ. llvm-svn: 326129
* [X86] Add constant folding to combineMOVMSK.Craig Topper2018-02-262-22/+78
| | | | | | There's still some shortcoming in our ability to combine binops of constants with different sizes separated by an extend. I'll try to look at that next. llvm-svn: 326128
* [opt-viewer] Kill parser processes before moving onto renderingAdam Nemet2018-02-261-0/+2
| | | | | | The main benefit is that they release the memory they were holding onto. llvm-svn: 326127
* opt-diff: Support splitting to multiple output filesAdam Nemet2018-02-261-4/+11
| | | | | | | When reading the resulting files back with opt-viewer, they will be parsed in parallel. llvm-svn: 326126
* [opt-viewer] Set title for the source pagesAdam Nemet2018-02-265-1/+7
| | | | llvm-svn: 326125
* opt-viewer: also find thinlto opt.yaml filesAdam Nemet2018-02-261-1/+1
| | | | llvm-svn: 326124
* opt-viewer: output index firstAdam Nemet2018-02-261-7/+9
| | | | | | One can start looking at the index while the pages are still generating llvm-svn: 326123
* [analyzer] Quickfix: do not overflow in calculating offset in RegionManagerGeorge Karpenkov2018-02-263-1/+60
| | | | | | | | | | | | | | Addresses https://bugs.llvm.org/show_bug.cgi?id=36206 rdar://37159026 A proper fix would be much harder, and would involve changing the appropriate code in ExprEngine to be aware of the size limitations of the type used for addressing. Differential Revision: https://reviews.llvm.org/D43218 llvm-svn: 326122
* [Darwin] Specify DWARF 2/4 when running apple accelerator tests.Davide Italiano2018-02-262-1/+6
| | | | | | | | | | These sections will be retired. Also, explicitly list llvm-objdump as a dependency. This should've been done in the previous commit, but I failed to squash the two changes together. Thanks to Adrian for pointing the first problem out in a comment. llvm-svn: 326121
* [libcxx] [test] Fix MSVC warnings and errors.Stephan T. Lavavej2018-02-2610-75/+76
| | | | | | | | | | | | | | | | | | | | | | | | test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp Fix MSVC x64 truncation warnings. warning C4267: conversion from 'size_t' to 'int', possible loss of data test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp Fix MSVC uninitialized memory warning. warning C6001: Using uninitialized memory 'vl'. test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp Include <cassert> for the assert() macro. Fixes D43273. llvm-svn: 326120
* [X86] Add a custom legalization for (i16 (bitcast v16i1)) and (i32 (bitcast ↵Craig Topper2018-02-264-1698/+121
| | | | | | | | | | | | | | | | | | | v32i1)) without AVX512 to prevent scalarization Summary: We have an early DAG combine to turn these patterns into MOVMSK, but that combine doesn't work if the vXi1 type has more elements than the widest legal vXi8 type. Type legalization will eventually split it down to v16i1 or v32i1 and then the bitcast gets legalized to a truncstore and a scalar load. The truncstore will get lowered to a series of extracts and bit math. This patch adds a custom legalization to use a sign extend and MOVMSK instead. This prevents the eventual scalarization. Reviewers: spatel, RKSimon, zvi Reviewed By: RKSimon Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D43593 llvm-svn: 326119
* Fix for LLVM r326109David Zarzycki2018-02-262-31/+24
| | | | llvm-svn: 326118
* [SLP] Added new test + fixed some checks, NFC.Alexey Bataev2018-02-262-13/+175
| | | | llvm-svn: 326117
* Revert "Emit proper CodeView when -gcodeview is passed without the cl driver."Zachary Turner2018-02-262-16/+1
| | | | | | | | | | This reverts commit e17911006548518634fad66bb8648bcad49a1d64. This is failing on ASAN bots because asan expects column info, and it's also failing on some linux bots for unknown reasons which i need to investigate. llvm-svn: 326116
* [InstCombine] Add test cases with vector constants to fpextend.llCraig Topper2018-02-261-0/+41
| | | | llvm-svn: 326115
* [InstCombine] Switch to using FileCheck instead of grep. Auto-generate ↵Craig Topper2018-02-261-30/+61
| | | | | | checks. NFC llvm-svn: 326114
* Emit proper CodeView when -gcodeview is passed without the cl driver.Zachary Turner2018-02-262-1/+16
| | | | | | | | | | | Windows debuggers don't work properly when column info is emitted with lines. We handled this by checking if the driver mode was cl, but it's possible to cause the gcc driver to emit codeview as well, and in that path we were emitting column info with codeview. Differential Revision: https://reviews.llvm.org/D43700 llvm-svn: 326113
* Add "lldb-test breakpoint" command and convert the case-sensitivity test to ↵Pavel Labath2018-02-269-145/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use it Summary: The command takes two input arguments: a module to use as a debug target and a file containing a list of commands. The command will execute each of the breakpoint commands in the file and dump the breakpoint state after each one. The commands are expected to be breakpoint set/remove/etc. commands, but I explicitly allow any lldb command here, so you can do things like change setting which impact breakpoint resolution, etc. There is also a "-persistent" flag, which causes lldb-test to *not* automatically clear the breakpoint list after each command. Right now I don't use it, but the idea behind it was that it could be used to test more complex combinations of breakpoint commands (set+modify, set+disable, etc.). Right now the command prints out only the basic breakpoint state, but more information can be easily added there. To enable easy matching of the "at least one breakpoint location found" state, the command explicitly prints out the string "At least one breakpoint location.". To enable testing of breakpoints set with an absolute paths, I add the ability to perform rudimentary substitutions on the commands: right now the string %p is replaced by the directory which contains the command file (so, under normal circumstances, this will perform the same substitution as lit would do for %p). I use this command to rewrite the TestBreakpointCaseSensitivity test -- the test was checking about a dozen breakpoint commands, but it was launching a new process for each one, so it took about 90 seconds to run. The new test takes about 0.3 seconds for me, which is approximately a 300x speedup. Reviewers: davide, zturner, jingham Subscribers: luporl, lldb-commits Differential Revision: https://reviews.llvm.org/D43686 llvm-svn: 326112
* Fix-up for r326106: FindAvailableMemoryRange needs a nullptr as its 5th ↵Kuba Mracek2018-02-261-2/+2
| | | | | | argument. llvm-svn: 326111
* Fix for LLVM r326109David Zarzycki2018-02-261-2/+4
| | | | llvm-svn: 326110
* [ADT] Simplify and optimize StringSwitchDavid Zarzycki2018-02-263-107/+82
| | | | | | | | This change improves incremental rebuild performance on dual Xeon 8168 machines by 54%. This change also improves run time code gen by not forcing the case values to be lvalues. llvm-svn: 326109
* [Driver] Forward opt-remark hotness threshold to LTOAdam Nemet2018-02-262-1/+14
| | | | llvm-svn: 326108
* [LTO] Support filtering by hotness thresholdAdam Nemet2018-02-268-11/+65
| | | | | | | | | | | This wires up -pass-remarks-hotness-threshold to LTO and ThinLTO. Next is to change the clang driver to pass this with -fdiagnostics-hotness-threshold. Differential Revision: https://reviews.llvm.org/D41465 llvm-svn: 326107
* [asan] Be more careful and verbose when allocating dynamic shadow memoryKuba Mracek2018-02-265-12/+36
| | | | | | | | FindAvailableMemoryRange can currently overwrite existing memory (by restricting the VM below addresses that are already used). This patch adds a check to make sure we don't restrict the VM space too much. We are also now more explicit about why the lookup failed and print out verbose values. Differential Revision: https://reviews.llvm.org/D43318 llvm-svn: 326106
* [MSan] Print current stack on CHECK violationAlex Shlyapnikov2018-02-263-2/+38
| | | | | | | | | | | | | | Summary: Print current stack on CHECK violation to aid debugging and match other sanitizers functionality. Reviewers: eugenis Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43692 llvm-svn: 326105
* [X86][AVX] createPSADBW - support 256-bit cases on AVX1 via ↵Simon Pilgrim2018-02-262-114/+47
| | | | | | SplitBinaryOpsAndApply llvm-svn: 326104
* [DebugInfo] Support DWARF v5 source code embedding extensionScott Linder2018-02-2612-7/+70
| | | | | | | | | | | | | In DWARF v5 the Line Number Program Header is extensible, allowing values with new content types. This vendor extension to DWARF v5 allows source text to be embedded directly in the line tables of the debug line section. Add new flag (-g[no-]embed-source) to Driver and CC1 which indicates that source should be passed through to LLVM during CodeGen. Differential Revision: https://reviews.llvm.org/D42766 llvm-svn: 326102
* AMDGPU/GlobalISel: Make f64 constants legalMatt Arsenault2018-02-262-10/+52
| | | | llvm-svn: 326101
* [scudo] Make some tests less Linux-yKostya Kortchinsky2018-02-265-44/+43
| | | | | | | | | | | | | | | | | | | | | Summary: Start making the Scudo tests less Linux-y: - `malloc_usable_size` doesn't exist everywhere, so replace them with `__sanitizer_get_allocated_size` which we provide; - move all the `memalign` related tests into `memalign.c` since it's also not available everywhere. I also noticed that the `memalign.c` was missing a line in one of the loops. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D43393 llvm-svn: 326100
* [CodeGen][DebugInfo] Refactor duplicated code, NFCScott Linder2018-02-261-6/+2
| | | | llvm-svn: 326099
* [InstCombine] allow fdiv folds with less than fully 'fast' opsSanjay Patel2018-02-262-21/+11
| | | | | | | | | | | | | | | | | | Note: gcc appears to allow this fold with -freciprocal-math alone, but clang/llvm require more than that with this patch. The wording in the definitions seems fuzzy enough that it could go either way, but we'll err on the conservative side of FMF interpretation. This patch also changes the newly created fmul to have FMF propagated by the last fdiv rather than intersecting the FMF of the fdivs. This matches the behavior of other folds near here. The new fmul is only used to produce an intermediate op for the final fdiv result, so it shouldn't be any stricter than that result. The previous behavior could result in dropping FMF via other folds in instcombine or CSE. Differential Revision: https://reviews.llvm.org/D43398 llvm-svn: 326098
* [X86][AVX] Add AVX1 PSAD testsSimon Pilgrim2018-02-262-374/+475
| | | | | | Cleanup check-prefixes to share more AVX/AVX512 codegen checks llvm-svn: 326097
* Revert r326092: [gtest] Add PrintTo overload for StringRef.Ilya Biryukov2018-02-261-13/+0
| | | | | | | | | It seems to break the following buildbot: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/24729 Will resubmit after investigating and fixing it. llvm-svn: 326096
* Fix tabs/spaces indentation problem in TestUnicodeSymbols.pyAdrian McCarthy2018-02-261-7/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D43705 llvm-svn: 326095
* [CodeGen] Don't omit any redundant information in -debug outputFrancis Visoiu Mistrih2018-02-266-10/+9
| | | | | | | | | | | | | | | | | | | | | In r322867, we introduced IsStandalone when printing MIR in -debug output. The default behaviour for that was: 1) If any of MBB, MI, or MO are -debug-printed separately, don't omit any redundant information. 2) When -debug-printing a MF entirely, don't print any redundant information. 3) When printing MIR, don't print any redundant information. I'd like to change 2) to: 2) When -debug-printing a MF entirely, don't omit any redundant information. Differential Revision: https://reviews.llvm.org/D43337 llvm-svn: 326094
* [X86][SSE] Regenerate PSAD tests Simon Pilgrim2018-02-261-8/+8
| | | | | | Fixes scary typo in a check that lost the end digit off a reg#... llvm-svn: 326093
* [gtest] Add PrintTo overload for StringRef.Ilya Biryukov2018-02-261-0/+13
| | | | | | | | | | | | | | | | Summary: It was printed using code for generic containers before, resulting in unreadable output. Reviewers: sammccall, labath Reviewed By: sammccall, labath Subscribers: labath, zturner, llvm-commits Differential Revision: https://reviews.llvm.org/D43330 llvm-svn: 326092
* Re-land: "[Support] Replace HashString with djbHash."Jonas Devlieghere2018-02-2611-221/+210
| | | | | | | | | | | | | | | | | | | | | This patch removes the HashString function from StringExtraces and replaces its uses with calls to djbHash from DJB.h. This change is *almost* NFC. While the algorithm is identical, the djbHash implementation in StringExtras used 0 as its default seed while the implementation in DJB uses 5381. The latter has been shown to result in less collisions and improved avalanching and is used by the DWARF accelerator tables. Because some test were implicitly relying on the hash order, I've reverted to using zero as a seed for the following two files: lld/include/lld/Core/SymbolTable.h llvm/lib/Support/StringMap.cpp Differential revision: https://reviews.llvm.org/D43615 llvm-svn: 326091
* [ELF] - Fix variable name and mistype in comment. NFC.George Rimar2018-02-261-4/+4
| | | | llvm-svn: 326090
OpenPOWER on IntegriCloud