summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb] Make TestIOHandlerCompletion more stable and document itRaphael Isemann2019-08-191-1/+4
| | | | | | | | | | Instead of relying that three tabs show all completions, we should show all remaining completions which will always stop the mode where we show completions. Should fix this test on systems that somehow have more completions that our normal LLDB (as they would end up being stuck in the mode where we show completions). llvm-svn: 369293
* [WebAssembly][MC] Allow empty assembly functionsSam Clegg2019-08-192-9/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D66434 llvm-svn: 369292
* [MemorySSA] Rename uses when inserting memory uses.Alina Sbirlea2019-08-195-17/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When inserting uses from outside the MemorySSA creation, we don't normally need to rename uses, based on the assumption that there will be no inserted Phis (if Def existed that required a Phi, that Phi already exists). However, when dealing with unreachable blocks, MemorySSA will optimize away Phis whose incoming blocks are unreachable, and these Phis end up being re-added when inserting a Use. There are two potential solutions here: 1. Analyze the inserted Phis and clean them up if they are unneeded (current method for cleaning up trivial phis does not cover this) 2. Leave the Phi in place and rename uses, the same way as whe inserting defs. This patch use approach 2. Resolves first test in PR42940. Reviewers: george.burgess.iv Subscribers: Prazek, sanjoy.google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66033 llvm-svn: 369291
* Build symbolizer runtime with C++14.Peter Collingbourne2019-08-191-1/+1
| | | | | | Should hopefully fix sanitizer-x86_64-linux bot. llvm-svn: 369290
* [TSan] Rename file to make it clear that it defines interceptorsJulian Lettner2019-08-192-2/+2
| | | | | | | Rename file `tsan_libdispatch.cpp -> tsan_libdispatch_interceptors.cpp` to make it clear that it's main purpose is defining interceptors. llvm-svn: 369289
* [X86] Move scheduling tests for CMPXCHG to the corresponding ↵Andrea Di Biagio2019-08-1924-492/+168
| | | | | | | | | | resources-x86_64.s files. NFC In D66424 it has been requested to move all the new tests added by r369278 into resources-x86_64.s. That is because only the 8b/16 ops should be tested by resources-cmpxchg.s. This partially reverts r369278. llvm-svn: 369288
* [X86] Teach lowerV4I32Shuffle to only use broadcasts if the mask has more ↵Craig Topper2019-08-1911-120/+73
| | | | | | | | | | | | | | than one undef element. Prioritize shifts over broadcast in lowerV8I16Shuffle. The motivating case are the changes in vector-reduce-add.ll where we were doing extra work in the scalar domain instead of shuffling. There may be some one use check that needs to be looked into there, but this patch sidesteps the issue by avoiding broadcasts that aren't really broadcasting. Differential Revision: https://reviews.llvm.org/D66071 llvm-svn: 369287
* Fix poorly formatted HTML in the cxx_status.html file caused by addingErich Keane2019-08-191-2/+3
| | | | | | 1668. llvm-svn: 369286
* [Sanitizer] arc4random interception on MacDavid Carlier2019-08-193-3/+4
| | | | | | | | | | Reviewers: yln,vitalybuka Reviewed By: yln Differential Revision: https://reviews.llvm.org/D66391 llvm-svn: 369285
* Fix test where diagnostics changed in P1668 implementationErich Keane2019-08-191-6/+19
| | | | llvm-svn: 369284
* [CGP] Remove ModifiedDT from the makeBitReverse loopCraig Topper2019-08-191-1/+0
| | | | | | | | | | I don't think anything in this loop modifies the control flow and we don't restart any iteration after setting the flag. This code was added in http://reviews.llvm.org/D16893 but looking at the test case added there the code that caused the dominator tree to change was merging blocks with their predecessor not the bitreverse optimization. Differential Revision: https://reviews.llvm.org/D66366 llvm-svn: 369283
* Update cxx_status.html with P1668 status.Erich Keane2019-08-191-0/+1
| | | | llvm-svn: 369282
* Implement P1668R1Erich Keane2019-08-195-4/+15
| | | | | | | Allow inline assembly statements in unexecuted branches of constexpr functions. llvm-svn: 369281
* [libc++] Add XFAIL for is_base_of test on AppleClang 11Louis Dionne2019-08-191-2/+2
| | | | llvm-svn: 369280
* [X86] Added extensive scheduling model tests for all the CMPXCHG variants. NFCAndrea Di Biagio2019-08-1912-12/+552
| | | | | | Addresses a review comment in D66424 llvm-svn: 369279
* [Attributor] -attributor-verify has false positives. Temporarily removeStefan Stipanovic2019-08-191-1/+0
| | | | | | it, until resolved. llvm-svn: 369277
* [lld][WebAssembly] Honor --no-export-dynamic even with -sharedSam Clegg2019-08-192-3/+22
| | | | | | Differential Revision: https://reviews.llvm.org/D66359 llvm-svn: 369276
* [clangd] Added highlighting for tokens that are macro arguments.Johan Vikstrom2019-08-192-8/+92
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adds semantic highlighting for tokens that are a macro argument. Example: ``` D_V(SomeVar); ``` The "SomeVar" inside the macro is highlighted as a variable now. Tokens that are in a macro body expansion are ignored in this patch for three reasons. * The spelling loc is inside the macro "definition" meaning it would highlight inside the macro definition (could probably easily be fixed by using getExpansionLoc instead of getSpellingLoc?) * If wanting to highlight the macro definition this could create duplicate tokens. And if the tokens are of different types there would be conflicts (tokens in the same range but with different types). Say a macro defines some name and both a variable declaration and a function use this, there would be two tokens in the macro definition but one with Kind "Variable" and the other with Kind "Function". * Thirdly, macro body expansions could come from a file that is not the main file (easily fixed, just check that the Loc is in the main file and not even a problem if we wanted to highlight the actual macro "invocation") Reviewers: hokein, sammccall, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64741 llvm-svn: 369275
* [dotest] Add --dwarf-version to override the tested DWARF version.Jonas Devlieghere2019-08-195-7/+22
| | | | | | | | | | | | | On the matrix bot on GreenDragon [1] we want to run the test suite against different DWARF versions. The idea here is not to replace targeted tests for certain DWARF features, but rather to provide an easy way to support this configuration. [1] http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/ Differential revision: https://reviews.llvm.org/D66370 llvm-svn: 369272
* [ELF] Simplify processRelocAux and allow a corner-case errorFangrui Song2019-08-192-5/+2
| | | | | | | | | | | | | | | | After D66007/r369262, if the control flow reaches `if (sym.isUndefined())`, we know: * The relocation is not a link-time constant => symbol is preemptable => Undefined or SharedSymbol * Not an undef weak. * -no-pie. * The symbol type is neither STT_OBJECT nor STT_FUNC. ld.lld --export-dynamic --unresolved-symbols=ignore-all %t.o can satisfy these conditions. Delete the isUndefined() test so that we error `symbol '...' has no type`, because we don't know the type to make the decision to create copy relocation/canonical PLT. llvm-svn: 369271
* [libc++] reverts commit a5f5aad568bb7a91ceee47641f3076ac339ef8c7.Zoe Carver2019-08-191-110/+260
| | | | | | | | | The commit being reverted caused segfaults when building with libc++ and GCC (and possibly other configurations). Differential Revision: https://reviews.llvm.org/D62868 llvm-svn: 369270
* Filesystem/Windows: fix inconsistency in readNativeFileSlice APIPavel Labath2019-08-192-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The windows version implementation of readNativeFileSlice, was trying to match the POSIX behavior of not treating EOF as an error, but it was only handling the case of reading from a pipe. Attempting to read past the end of a regular file returns a slightly different error code, which needs to be handled too. This patch adds ERROR_HANDLE_EOF to the list of error codes to be treated as an end of file, and adds some unit tests for the API. This issue was found while attempting to land D66224, which caused a bunch of lldb tests to start failing on windows. Reviewers: rnk, aganea Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66344 llvm-svn: 369269
* [TargetLowering] x s% C == 0 fold: vector divisor with INT_MIN handlingRoman Lebedev2019-08-192-133/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The general fold is only valid for positive divisors. Which effectively means, it is invalid for `INT_MIN` divisors, and we currently bailout if we see them. But that is too strict, we can just fix-up the results. For that, let's do a second computation 'in parallel': ``` Name: srem -> and Pre: isPowerOf2(C) %o = srem i8 %X, C %r = icmp eq %o, 0 => %n = and i8 %X, C-1 %r = icmp eq %n, 0 ``` https://rise4fun.com/Alive/Sup And then just blend results: if the divisor was `INT_MIN`, pick the value we got via bit-test, else pick the value from general fold. There's interesting observation - `ISD::ROTR` is set to `LegalizeAction::Expand` before AVX512, so we should not treat `INT_MIN` divisor as even; and as it can be seen while `@test_srem_odd_even_one` improves on all run-lines, `@test_srem_odd_even_INT_MIN` only improves for AVX512. Reviewers: RKSimon, craig.topper, spatel Reviewed By: RKSimon Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66300 llvm-svn: 369268
* [lldb][NFC] Stop using GetNumberOfMatches in CompletionRequest testRaphael Isemann2019-08-191-14/+14
| | | | | | | | This function is just a wrapper for GetNumberOfResults and will be removed soon. This patch just changes all calls to GetNumberOfResults where possible (which is currently just the unit test). llvm-svn: 369267
* [nfc] Silent gcc warningSerge Guelton2019-08-191-3/+2
| | | | llvm-svn: 369266
* [llvm-objdump] - Restore lost comment.George Rimar2019-08-191-0/+1
| | | | | | It was removed by mistake in r369263 (D66417). llvm-svn: 369265
* Automatically generate AVX512 test cases. NFCAmaury Sechet2019-08-199-199/+255
| | | | llvm-svn: 369264
* [Object/COFF.h] - Stop returning std::error_code in a few methods. NFCI.George Rimar2019-08-197-74/+24
| | | | | | | | | | There are 4 methods that return std::error_code now, though they do not have to because they are always succeed. I refactored them. This allows to simplify the code in tools a bit. llvm-svn: 369263
* [ELF] Move (copy relocation/canonical PLT) before error checkingFangrui Song2019-08-197-85/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | In processRelocAux(), we handle errors before copy relocation/canonical PLT. This makes error checking a bit complex because we have to check for conditions that will be allowed by copy relocation/canonical PLT. Instead, move copy relocation/canonical PLT before error checking. This simplifies the previous clumsy error checking code `config->shared || (config->pie && expr == R_ABS && type != target->symbolicRel)` to the simple `config->isPic`. Some diagnostics can be reported in different ways. The code motion changes diagnostics for some contrived test cases: * copy-rel-pie-error.s -> copy-rel-pie2.s: It was rejected before but accepted now. ld.bfd also accepts the case. * copy-errors.s: "cannot preempt symbol" changes to "symbol 'bar' has no type" * got32{,x}-i386.s: the suggestion changes from "-fPIC or -Wl,-z,notext" to "-fPIE" * x86-64-dyn-rel-error5.s: one diagnostic changes for -pie case Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D66007 llvm-svn: 369262
* [PeepholeOptimizer] Don't assume bitcast def always has inputJinsong Ji2019-08-193-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If we have a MI marked with bitcast bits, but without input operands, PeepholeOptimizer might crash with assert. eg: If we apply the changes in PPCInstrVSX.td as in this patch: [(set v4i32:$XT, (bitconvert (v16i8 immAllOnesV)))]>; We will get assert in PeepholeOptimizer. ``` llvm-lit llvm-project/llvm/test/CodeGen/PowerPC/build-vector-tests.ll -v llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:417: const llvm::MachineOperand &llvm::MachineInstr::getOperand(unsigned int) const: Assertion `i < getNumOperands() && "getOperand() out of range!"' failed. ``` The fix is to abort if we found out of bound access. Reviewers: qcolombet, MatzeB, hfinkel, arsenm Reviewed By: qcolombet Subscribers: wdng, arsenm, steven.zhang, wuzish, nemanjai, hiraditya, kbarton, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65542 llvm-svn: 369261
* [ELF][Hexagon] Improve error message for unknown relocationsFangrui Song2019-08-191-3/+18
| | | | | | | | | | | | | | | | | | | | Like rLLD354040 Previously, for unknown relocation types, in -no-pie/-pie mode, we got something like: foo.o: unrecognized relocation ... In -shared mode: error: can't create dynamic relocation ... against symbol: yyy in readonly segment Delete the default case from Hexagon::getRelExpr and add the error there. We will get consistent error message like `error: unknown relocation (1024) against symbol foo` Reviewed By: sidneym Differential Revision: https://reviews.llvm.org/D66275 llvm-svn: 369260
* Don't keep stale pointers to LoopInfos.Aaron Ballman2019-08-193-7/+24
| | | | | | | | CGLoopInfo was keeping pointers to parent loop LoopInfos, but when the loop info vector grew, it reallocated the storage and invalidated all of the parent pointers, causing use-after-free. Manage the lifetimes of the LoopInfos separately so that the pointers aren't stale. Patch by Bevin Hansson. llvm-svn: 369259
* [lld][Hexagon] Add GOTREL relocations.Sid Manning2019-08-192-0/+38
| | | | | | | | Add GOTREL relocation support. (S + A - GOT) Differential Revision: https://reviews.llvm.org/D66260 llvm-svn: 369258
* [RISCV] Don't force absolute FK_Data_X fixups to relocsAlex Bradbury2019-08-193-3/+28
| | | | | | | | | | | | The current behavior of shouldForceRelocation forces relocations for the majority of fixups when relaxation is enabled. This makes sense for fixups which incorporate symbols but is unnecessary for simple data fixups where the fixup target is already resolved to an absolute value. Differential Revision: https://reviews.llvm.org/D63404 Patch by Edward Jones. llvm-svn: 369257
* [DebugInfo] Allow bundled calls in the MIR's call site infoDavid Stenberg2019-08-193-4/+52
| | | | | | | | | | | | | | | | | | Summary: Extend the MIR parser and writer so that the call site information can refer to calls that are bundled. Reviewers: aprantl, asowda, NikolaPrica, djtodoro, ivanbaev, vsk Reviewed By: aprantl Subscribers: arsenm, hiraditya, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D66145 llvm-svn: 369256
* [SLP] add test that requires shuffle of scalars; NFCSanjay Patel2019-08-191-0/+26
| | | | llvm-svn: 369255
* [llvm-readobj] unwrapOrError: remove unnecessary llvm_unreachable after r369194Fangrui Song2019-08-191-1/+0
| | | | llvm-svn: 369254
* [OpenCL] Add generic type handling for builtin functionsSven van Haastregt2019-08-194-257/+613
| | | | | | | | | | | | | | | | | | Generic types are an abstraction of type sets. It mimics the way functions are defined in the OpenCL specification. For example, floatN can abstract all the vector sizes of the float type. This allows to * stick more closely to the specification, which uses generic types; * factorize definitions of functions with numerous prototypes in the tablegen file; and * reduce the memory impact of functions with many overloads. Patch by Pierre Gondois and Sven van Haastregt. Differential Revision: https://reviews.llvm.org/D65456 llvm-svn: 369253
* [lldb][NFC] Use CompletionRequest in Variable::AutoCompleteRaphael Isemann2019-08-191-43/+32
| | | | llvm-svn: 369252
* [OpenCL] Fix addr space deduction for pointers/references to arrays.Anastasia Stulova2019-08-192-2/+38
| | | | | | | | | | | Rewrite the logic for detecting if we are deducing addr space of a pointee type to take into account special logic for arrays. For pointers/references to arrays we can have any number of parentheses expressions as well as nested pointers. Differential Revision: https://reviews.llvm.org/D66137 llvm-svn: 369251
* [SLP] reduce duplicated code; NFCSanjay Patel2019-08-191-2/+4
| | | | llvm-svn: 369250
* [lldb][NFC] Add a few more completion tests to increase test coverageRaphael Isemann2019-08-191-0/+23
| | | | | | | These tests are mostly trying to reach the different completion functions in CommandCompletions.cpp (::ArchitectureNames, ::DiskFiles, ::Modules). llvm-svn: 369249
* [MC] Simplify ELFObjectWriter::recordRelocation. NFCFangrui Song2019-08-191-22/+16
| | | | llvm-svn: 369248
* [DebugInfo] Make postra sinking of DBG_VALUEs subregister-safeJeremy Morse2019-08-192-9/+132
| | | | | | | | | | | | | | | | | | | | | | | | Currently the machine instruction sinker identifies DBG_VALUE insts that also need to sink by comparing register numbers. Unfortunately this isn't safe, because (after register allocation) a DBG_VALUE may read a register that aliases what's being sunk. To fix this, identify the DBG_VALUEs that need to sink by recording & examining their register units. Register units gives us the following guarantee: "Two registers overlap if and only if they have a common register unit" [MCRegisterInfo.h] Thus we can always identify aliasing DBG_VALUEs if the set of register units read by the DBG_VALUE, and the register units of the instruction being sunk, intersect. (MachineSink already uses classes like "LiveRegUnits" for determining sinking validity anyway). The test added checks for super and subregister DBG_VALUE reads of a sunk copy being sunk as well. Differential Revision: https://reviews.llvm.org/D58191 llvm-svn: 369247
* [ELF][ARM] Add a test that maxes out the thunk convergence limitPeter Smith2019-08-191-0/+111
| | | | | | | | | | | Add a test that takes the maximum amount of passes permitted to converge. This will make sure that any symbol defined in a linker script gets the correct value and that any other convergence limit involving symbol address doesn't restrict Thunk convergence. Differential Revision: https://reviews.llvm.org/D66346 llvm-svn: 369246
* [ARM] Add support for MVE vaddvSam Tebbs2019-08-196-0/+80
| | | | | | | | | This patch adds vecreduce_add and the relevant instruction selection for vaddv. Differential revision: https://reviews.llvm.org/D66085 llvm-svn: 369245
* [ARM] MVE sext costsDavid Green2019-08-192-16/+77
| | | | | | | | | This adds some sext costs for MVE, taken from the length of assembly sequences that we currently generate. Differential Revision: https://reviews.llvm.org/D66010 llvm-svn: 369244
* [DebugInfo] Test for variable range un-coalescingJeremy Morse2019-08-191-0/+138
| | | | | | | | | | | | | | | | LiveDebugVariables can coalesce ranges of variable locations across multiple basic blocks. However when it recreates DBG_VALUE instructions, it has to recreate one DBG_VALUE per block, otherwise it doesn't represent the pre-regalloc layout and variable assignments can go missing. This feature works -- however while mucking around with LiveDebugVariables, I commented the relevant code it out and no tests failed. Thus, here's a test that checks LiveDebugVariables preserves DBG_VALUEs across block boundaries. Differential Revision: https://reviews.llvm.org/D66347 llvm-svn: 369243
* [lldb][NFC] Remove StringList::AutoCompleteRaphael Isemann2019-08-193-37/+12
| | | | | | | We don't need this very specific function in StringList that we only call once in LLDB. llvm-svn: 369242
* Revert [Attributor] Fix: Make sure we set the changed flagDavid L. Jones2019-08-191-4/+4
| | | | | | | | This reverts r369159 (git commit cbaf1fdea2de891bdbc49cdec89ae2077e6b9ed0) r369160 caused a test to fail under UBSAN. See thread on llvm-commits. llvm-svn: 369241
OpenPOWER on IntegriCloud