summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [utils] Use operator "in" instead of bound function "has_key"Roger Ferrer Ibanez2018-12-071-1/+1
| | | | | | | | | has_key has been removed in Python 3. The in comparison operator can be used instead. Differential Revision: https://reviews.llvm.org/D55310 llvm-svn: 348576
* [X86] Add ivybridge to llvm-exegesis PFM counter mappingsSimon Pilgrim2018-12-071-0/+1
| | | | llvm-svn: 348575
* [SelectionDAG] Don't pass on DemandedElts when handling SCALAR_TO_VECTORSimon Pilgrim2018-12-072-1/+12
| | | | | | | | | | | | Fixes an assertion: llc: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2200: llvm::KnownBits llvm::SelectionDAG::computeKnownBits(llvm::SDValue, const llvm::APInt&, unsigned int) const: Assertion `(!Op.getValueType().isVector() || NumElts == Op.getValueType().getVectorNumElements()) && "Unexpected vector size"' failed. Committed on behalf of: @pendingchaos (Rhys Perry) Differential Revision: https://reviews.llvm.org/D55223 llvm-svn: 348574
* [CMake] Add support for NO_INSTALL_RPATH argument in llvm_add_library()Stefan Granitz2018-12-071-5/+9
| | | | | | | | | | | | | | | | Summary: Allow clients to suppress setup of default RPATHs in designated library targets. This is used in LLDB when emitting liblldb as a framework bundle, which itself doesn't load further RPATH-dependent libraries. This follows the approach in add_llvm_executable(). Reviewers: aprantl, JDevlieghere, davide, friss Reviewed By: aprantl Subscribers: mgorny, lldb-commits, llvm-commits, #lldb Differential Revision: https://reviews.llvm.org/D55316 llvm-svn: 348573
* [PowerPC] VSX register support for inline assemblyKang Zhang2018-12-073-0/+52
| | | | | | | | | | | | Summary: The patch is to add the VSX register support for inline assembly. After this patch, we can use VSX register in inline assembly clobber list without error. Reviewed By: jsji, nemanjai Differential Revision: https://reviews.llvm.org/D55192 llvm-svn: 348572
* [IR] Don't assume all functions are 4 byte alignedRanjeet Singh2018-12-073-20/+32
| | | | | | | | | | | | | | | | | In some cases different alignments for function might be used to save space e.g. thumb mode with -Oz will try to use 2 byte function alignment. Similar patch that fixed this in other areas exists here https://reviews.llvm.org/D46110 This was approved previously https://reviews.llvm.org/D55115 (r348215) but when committed it caused failures on the sanitizer buildbots when building llvm with clang (containing this patch). This is now fixed because I've added a check to see if getting the parent module returns null if it does then set the alignment to 0. Differential Revision: https://reviews.llvm.org/D55115 llvm-svn: 348571
* [PM] Port LoadStoreVectorizer to the new pass manager.Markus Lavin2018-12-0724-18/+87
| | | | | | Differential Revision: https://reviews.llvm.org/D54848 llvm-svn: 348570
* Fix thunks returning memptrs via sret by emitting also scalar return values ↵Hans Wennborg2018-12-073-5/+30
| | | | | | | | | | | | | | | | | | | directly in sret slot (PR39901) Thunks that return member pointers via sret are broken due to using temporary storage for the return value on the stack and then passing that pointer to a tail call, violating the rule that a tail call can't access allocas in the caller (see bug). Since r90526, we put aggregate return values directly in the sret slot, but this doesn't apply to member pointers which are considered scalar. Unless I'm missing something subtle, we should be able to always use the sret slot directly for indirect return values. Differential revision: https://reviews.llvm.org/D55371 llvm-svn: 348569
* [XRay] Use preallocated memory for XRay profilingDean Michael Berris2018-12-0711-150/+460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change builds upon D54989, which removes memory allocation from the critical path of the profiling implementation. This also changes the API for the profile collection service, to take ownership of the memory and associated data structures per-thread. The consolidation of the memory allocation allows us to do two things: - Limits the amount of memory used by the profiling implementation, associating preallocated buffers instead of allocating memory on-demand. - Consolidate the memory initialisation and cleanup by relying on the buffer queue's reference counting implementation. We find a number of places which also display some problematic behaviour, including: - Off-by-factor bug in the allocator implementation. - Unrolling semantics in cases of "memory exhausted" situations, when managing the state of the function call trie. We also add a few test cases which verify our understanding of the behaviour of the system, with important edge-cases (especially for memory-exhausted cases) in the segmented array and profile collector unit tests. Depends on D54989. Reviewers: mboerger Subscribers: dschuff, mgorny, dmgreen, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D55249 llvm-svn: 348568
* [LoopSimplifyCFG] Do not deal with loops with irreducible CFG insideMax Kazantsev2018-12-072-0/+91
| | | | | | | | | | | | | | | | | | | | | The current algorithm that collects live/dead/inloop blocks relies on some invariants related to RPO and PO traversals. In particular, the important fact it requires is that the only loop's latch is the first block in PO traversal. It also relies on fact that during RPO we visit all prececessors of a block before we visit this block (backedges ignored). If a loop has irreducible non-loop cycle inside, both these assumptions may break. This patch adds detection for this situation and prohibits the terminator folding for loops with irreducible CFG. We can in theory support this later, for this some algorithmic changes are needed. Besides, irreducible CFG is not a frequent situation and we can just don't bother. Thanks @uabelho for finding this! Differential Revision: https://reviews.llvm.org/D55357 Reviewed By: skatkov llvm-svn: 348567
* [PowerPC] Fix assert from machine verify pass that missing undef register flagZi Xuan Wu2018-12-0721-43/+39
| | | | | | | | | | | | | | | | | | | | Fix assert about using an undefined physical register in machine instruction verify pass. The reason is that register flag undef is missing when doing transformation from If Conversion Pass. ``` Bad machine code: Using an undefined physical register - function: func_65 - basic block: %bb.0 entry (0x10024740738) - instruction: BCLR killed $cr5lt, implicit $lr8, implicit $rm, implicit undef $x3 - operand 0: killed $cr5lt LLVM ERROR: Found 1 machine code errors. ``` There are also other existing testcases with same issue. So I add -verify-machineinstrs option to open verifying. Differential Revision: https://reviews.llvm.org/D55408 llvm-svn: 348566
* [llvm-mca] Improve test (NFC)Evandro Menezes2018-12-071-8/+14
| | | | | | Add more instructions to the test for Cortex. llvm-svn: 348565
* [llvm-mca] Improve test (NFC)Evandro Menezes2018-12-071-3/+4
| | | | | | Add a label to make explicit that the branch is short for Exynos. llvm-svn: 348564
* Re-land "[XRay] Move-only Allocator, FunctionCallTrie, and Array"Dean Michael Berris2018-12-077-384/+924
| | | | | | | | | | | This reverts commit r348455, with some additional changes: - Work-around deficiency of gcc-4.8 by duplicating the implementation of `AppendEmplace` in `Append`, but instead of using brace-init for the copy construction, use a placement new explicitly calling the copy constructor. llvm-svn: 348563
* [CodeExtractor] Store outputs at the first valid insertion pointVedant Kumar2018-12-072-12/+80
| | | | | | | | | | | | | | | | | | | | | | | | When CodeExtractor outlines values which are used by the original function, it must store those values in some in-out parameter. This store instruction must not be inserted in between a PHI and an EH pad instruction, as that results in invalid IR. This fixes the following verifier failure seen while outlining within ObjC methods with live exit values: The unwind destination does not have an exception handling instruction! %call35 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %exn.adjusted, i8* %1) to label %invoke.cont34 unwind label %lpad33, !dbg !4183 The unwind destination does not have an exception handling instruction! invoke void @objc_exception_throw(i8* %call35) #12 to label %invoke.cont36 unwind label %lpad33, !dbg !4184 LandingPadInst not the first non-PHI instruction in the block. %3 = landingpad { i8*, i32 } catch i8* null, !dbg !1411 rdar://46540815 llvm-svn: 348562
* Add SBInitializerOptions.h to the Xcode project.Jim Ingham2018-12-071-0/+4
| | | | | | | | And mark it as a public header so it will get copied into the LLDB.framework. A handful of "api" tests were failing because they couldn't find this file. llvm-svn: 348561
* Revert "[llvm-tapi] Don't override SequenceTraits for std::string"Armando Montanez2018-12-071-17/+12
| | | | | | Revert r348551 since it triggered some warnings that don't appear to have a quick fix. llvm-svn: 348560
* Handle detecting exec for DynamicLoaderMacOS with older debugserversJim Ingham2018-12-072-11/+34
| | | | | | | | | | that don't send reason:exec. <rdar://problem/43756823> Differential Revision: https://reviews.llvm.org/D55399 llvm-svn: 348559
* Revert "[DemandedBits][BDCE] Support vectors of integers"Nikita Popov2018-12-075-198/+46
| | | | | | | This reverts commit r348549. Causing assertion failures during clang build. llvm-svn: 348558
* Change the amount of data that Platform::PutFile will try to transferJason Molenda2018-12-071-1/+1
| | | | | | | | | | | | | in one packet from 1k bytes to 16k bytes. Sending a large file to an iOS device directly connected by USB cable, to lldb-server running in platform mode, this speeds up the file xfer by 77%. Sending the file in 32k blocks speeds up the file xfer by 80% versus 1k blocks, starting with 16k to make sure we don't have any problems with android testing. We may not have the same perf characteristics over ethernet, but with USB it's faster to send fewer larger packets than many small packets. llvm-svn: 348557
* Host: remove Yield on WindowsSaleem Abdulrasool2018-12-071-0/+1
| | | | | | | | Windows provides a Yield function-like macro that allows a thread to yield the CPU. However, this conflicts with `Yield` in swift. Undefine `Yield` to allow building lldb with swift support. llvm-svn: 348556
* Add test for InitListExprStephen Kelly2018-12-071-0/+18
| | | | llvm-svn: 348553
* [DAGCombiner] use root SDLoc for all nodes created by logic foldSanjay Patel2018-12-074-73/+69
| | | | | | | | | | | If this is not a valid way to assign an SDLoc, then we get this wrong all over SDAG. I don't know enough about the SDAG to explain this. IIUC, theoretically, debug info is not supposed to affect codegen. But here it has clearly affected 3 different targets, and the x86 change is an actual improvement. llvm-svn: 348552
* [llvm-tapi] Don't override SequenceTraits for std::stringArmando Montanez2018-12-061-12/+17
| | | | | | | | | | | | | | Change the ELF YAML implementation of TextAPI so NeededLibs uses flow sequence vector correctly instead of overriding the YAML implementation for std::vector<std::string>>. This should fix the test failure with the LLVM_LINK_LLVM_DYLIB build mentioned in D55381. Still passes existing tests that cover this. Differential Revision: https://reviews.llvm.org/D55390 llvm-svn: 348551
* [DAGCombiner] don't bother saving a SDLoc for a node that's dead; NFCISanjay Patel2018-12-061-1/+1
| | | | | | | | | | | | | | We shouldn't care about the debug location for a node that we're creating, but attaching the root of the pattern should be the best effort. (If this is not true, then we are doing it wrong all over the SDAG). This is no-functional-change-intended, and there are no regression test diffs...and that's what I expected. But there's a similar line above this diff, where those assumptions apparently do not hold. llvm-svn: 348550
* [DemandedBits][BDCE] Support vectors of integersNikita Popov2018-12-065-46/+198
| | | | | | | | | | | | | | | | | | | DemandedBits and BDCE currently only support scalar integers. This patch extends them to also handle vector integer operations. In this case bits are not tracked for individual vector elements, instead a bit is demanded if it is demanded for any of the elements. This matches the behavior of computeKnownBits in ValueTracking and SimplifyDemandedBits in InstCombine. The getDemandedBits() method can now only be called on instructions that have integer or vector of integer type. Previously it could be called on any sized instruction (even if it was not particularly useful). The size of the return value is now always the scalar size in bits (while previously it was the type size in bits). Differential Revision: https://reviews.llvm.org/D55297 llvm-svn: 348549
* [BDCE] Add tests for BDCE applied to vector instructions; NFCNikita Popov2018-12-061-0/+156
| | | | | | These are baseline tests for D55297. llvm-svn: 348548
* [DAGCombiner] more clean up in hoistLogicOpWithSameOpcodeHands(); NFCSanjay Patel2018-12-061-41/+34
| | | | | | This code can still misbehave. llvm-svn: 348547
* NFC: Move VisitExpr code to dumpStmtStephen Kelly2018-12-061-89/+38
| | | | | | | | | | | | | | | | Summary: The call is duplicated in the handlers of all Expr subclasses. This change makes it easy to split statement handling out to TextNodeDumper. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55339 llvm-svn: 348546
* NFC: Move VisitStmt code to dumpStmtStephen Kelly2018-12-061-23/+6
| | | | | | | | | | | | Summary: This call is duplicated in Visits of all direct subclasses of Stmt. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55338 llvm-svn: 348545
* [lit] Use the build.py script in the case-insensitive testStella Stamenova2018-12-061-2/+3
| | | | | | This makes the test build correctly regardless of whether we use VS or ninja to run the tests llvm-svn: 348544
* Add more expected content to match in testStephen Kelly2018-12-061-3/+3
| | | | llvm-svn: 348543
* [pecoff] Use PATH_MAX instead of MAX_PATHStella Stamenova2018-12-061-1/+1
| | | | | | PATH_MAX is defined on all platforms while MAX_PATH is Windows-specific llvm-svn: 348542
* Use relative line offsets in testStephen Kelly2018-12-061-12/+12
| | | | llvm-svn: 348541
* [frontend][darwin] warn_stdlibcxx_not_found: supress warning for ↵Alex Lorenz2018-12-062-1/+8
| | | | | | | | preprocessed input Addresses second post-commit feedback for r335081 from Nico llvm-svn: 348540
* Run `git ls-files '*.gn' '*.gni' | xargs -n 1 gn format`.Nico Weber2018-12-061-0/+1
| | | | llvm-svn: 348539
* [gn build] merge r348505.Nico Weber2018-12-061-0/+1
| | | | llvm-svn: 348537
* [X86] Directly create ADC/SBB nodes instead of using ADD/SUB with (and ↵Craig Topper2018-12-062-47/+8
| | | | | | | | | | | | SETCC_CARRY, 1) This addresses a FIXME and avoids depending on an isel pattern match I think. I've remove the isel patterns too since he have no lit tests left that cover them. Hopefully that really means they are unused. I'm trying to decide if we need SETCC_CARRY. This removes one of its usages. Differential Revision: https://reviews.llvm.org/D55355 llvm-svn: 348536
* [DAGCombiner] don't group bswap with casts in logic hoisting foldSanjay Patel2018-12-062-31/+26
| | | | | | | | | | | | | | | | This was probably organized as it was because bswap is a unary op. But that's where the similarity to the other opcodes ends. We should not limit this transform to scalars, and we should not try it if either input has other uses. This is another step towards trying to clean this whole function up to prevent it from causing infinite loops and memory explosions. Earlier commits in this series: rL348501 rL348508 rL348518 llvm-svn: 348534
* [analyzer] Rely on os_consumes_this attribute to signify that the method ↵George Karpenkov2018-12-063-0/+23
| | | | | | | | call consumes a reference for "this" Differential Revision: https://reviews.llvm.org/D55158 llvm-svn: 348533
* [attributes] Add an attribute os_consumes_this, with similar semantics to ↵George Karpenkov2018-12-064-4/+30
| | | | | | | | | | | ns_consumes_self The attribute specifies that the call of the C++ method consumes a reference to "this". Differential Revision: https://reviews.llvm.org/D55155 llvm-svn: 348532
* [analyzer] Fix an infinite recursion bug while checking parent methods in ↵George Karpenkov2018-12-062-1/+13
| | | | | | | | RetainCountChecker Differential Revision: https://reviews.llvm.org/D55351 llvm-svn: 348531
* [x86] add test for vector bitwise-logic-of-bswaps; NFCSanjay Patel2018-12-061-5/+56
| | | | llvm-svn: 348530
* [libc++] Improve diagnostics for non-const comparators and hashers in ↵Louis Dionne2018-12-069-72/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | associative containers Summary: When providing a non-const-callable comparator in a map or set, the warning diagnostic does not include the point of instantiation of the container that triggered the warning, which makes it difficult to track down the problem. This commit improves the diagnostic by placing it directly in the body of the associative container. The same change is applied to unordered associative containers, which had a similar problem. Finally, this commit cleans up the forward declarations of several map and unordered_map helpers, which are not needed anymore. <rdar://problem/41370747> Reviewers: EricWF, mclow.lists Subscribers: christof, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D48955 llvm-svn: 348529
* [pecoff] Implement ObjectFilePECOFF::GetDependedModules()Aaron Smith2018-12-066-11/+504
| | | | | | | | | | | | | | | | | | Summary: This parses entries in pecoff import tables for imported DLLs and is intended as the first step to allow LLDB to load a PE's shared modules when creating a target on the LLDB console. Reviewers: rnk, zturner, aleksandr.urakov, lldb-commits, labath, asmith Reviewed By: labath, asmith Subscribers: labath, lemo, clayborg, Hui, mgorny, mgrang, teemperor Differential Revision: https://reviews.llvm.org/D53094 llvm-svn: 348527
* Implement WindowsDYLD::DidAttach for use with gdb-server attachNathan Lanza2018-12-061-1/+35
| | | | | | | | | | | | | | | Summary: Windows lldb debugging currently uses a process plugin to handle launching and attaching to a process. Launching a process via a debug server (e.g. ds2) and attaching to it with `gdb-remote port` currently doesn't communicate address information of the executable properly. Implement DynamicLoaderWindowsDYLD::DidAttach which allow us to obtain the proper executable load address. Differential Revision: https://reviews.llvm.org/D55383 llvm-svn: 348526
* [libcxx] Always convert 'use_system_cxx_lib' to an absolute pathLouis Dionne2018-12-061-0/+1
| | | | | | | | Otherwise, some tests would fail when a relative path was passed, because they'd use the relative path from a different directory than the current working directory. llvm-svn: 348525
* [test] Add missing cmake include for building libFuzzer aloneMichal Gorny2018-12-061-0/+2
| | | | | | | | | | | | | | Include CompilerRTCompile in fuzzer tests explicitly. Otherwise, when building only libFuzzer, CMake fails due to: CMake Error at cmake/Modules/AddCompilerRT.cmake:395 (sanitizer_test_compile): Unknown CMake command "sanitizer_test_compile". Call Stack (most recent call first): lib/fuzzer/tests/CMakeLists.txt:53 (generate_compiler_rt_tests) Differential Revision: https://reviews.llvm.org/D55378 llvm-svn: 348524
* [DAGCombiner] reduce indent; NFCSanjay Patel2018-12-061-38/+31
| | | | | | | | Unlike some of the folds in hoistLogicOpWithSameOpcodeHands() above this shuffle transform, this has the expected hasOneUse() checks in place. llvm-svn: 348523
* [DagCombiner][X86] Simplify a ConcatVectors of a scalar_to_vector with undef.Andrea Di Biagio2018-12-062-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a new DAGCombiner rule to simplify concat_vectors nodes: concat_vectors( bitcast (scalar_to_vector %A), UNDEF) --> bitcast (scalar_to_vector %A) This patch only partially addresses PR39257. In particular, it is enough to fix one of the two problematic cases mentioned in PR39257. However, it is not enough to fix the original test case posted by Craig; that particular case would probably require a more complicated approach (and knowledge about used bits). Before this patch, we used to generate the following code for function PR39257 (-mtriple=x86_64 , -mattr=+avx): vmovsd (%rdi), %xmm0 # xmm0 = mem[0],zero vxorps %xmm1, %xmm1, %xmm1 vblendps $3, %xmm0, %xmm1, %xmm0 # xmm0 = xmm0[0,1],xmm1[2,3] vmovaps %ymm0, (%rsi) vzeroupper retq Now we generate this: vmovsd (%rdi), %xmm0 # xmm0 = mem[0],zero vmovaps %ymm0, (%rsi) vzeroupper retq As a side note: that VZEROUPPER is completely redundant... I guess the vzeroupper insertion pass doesn't realize that the definition of %xmm0 from vmovsd is already zeroing the upper half of %ymm0. Note that on %-mcpu=btver2, we don't get that vzeroupper because pass vzeroupper insertion %pass is disabled. Differential Revision: https://reviews.llvm.org/D55274 llvm-svn: 348522
OpenPOWER on IntegriCloud