summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [clangd] TestFS cleanup: getVirtualBlahBlah -> testPath/testRoot. Remove ↵Sam McCall2018-02-168-87/+79
| | | | | | SmallString micro-opt for more ergonomic tests. NFC llvm-svn: 325326
* [LegalizeDAG] Fix legalization of SETCCMikhail Maltsev2018-02-162-1/+24
| | | | | | | | | | | | | | | | | | | Summary: Currently when expanding a SETCC node into a SELECT_CC, LLVM uses an incorrect type for determining BooleanContent of the result. This patch fixes the issue. Fixes PR36079. Reviewers: rogfer01, javed.absar, efriedma Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43282 llvm-svn: 325325
* [lldb][PPC64] Fixed vector and struct return valuePavel Labath2018-02-162-145/+575
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The PowerPC64 ABI plugin was modified to: - properly handle vector type return values - implement support for struct/class return values A refactoring in the code that handles return values was also performed, to make it possible to handle structs without repeating (when possible) code that handles its fields. There was also an issue with CreateInstance(), that only created an instance in the first time it was called and then cached it in a static var. When restarting a process under LLDB's control, the ABI's process weak pointer would become null, and using it would result in a segmentation fault. This issue became more evident after the latest changes to PPC64 plugin, that now uses the process pointer to get the target byte order, making LLDB to seg fault when restarting a program. This was fixed by making CreateInstance() to always create a new ABI instance. All of LLDB's ReturnValue tests are passing for PPC64le now. It should work for PPC64be too, although this was not tested. Reviewers: labath, clayborg Reviewed By: labath Subscribers: lbianc, anajuliapc, llvm-commits, alexandreyy, nemanjai, kbarton Differential Revision: https://reviews.llvm.org/D42468 Patch by Leandro Lupori <leandro.lupori@gmail.com>. llvm-svn: 325324
* [ARM] Materialise some boolean values to avoid a branchRoger Ferrer Ibanez2018-02-1621-723/+929
| | | | | | | | | | | | | This patch combines some cases of ARMISD::CMOV for integers that arise in comparisons of the form a != b ? x : 0 a == b ? 0 : x and that currently (e.g. in Thumb1) are emitted as branches. Differential Revision: https://reviews.llvm.org/D34515 llvm-svn: 325323
* [dosep] Run tests in a more parallel fashionPavel Labath2018-02-162-61/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Due to in-tree builds, we were parallelizing the tests at the directory level. Now that the tests are built out-of-tree, we can remove this limitation and paralelize at file level instead. This decreases test suite time by about 10% for me, which is not world-shattering, but it makes the code slightly simpler and will also allow us to merge tests which were artificially spread over multiple folders (TestConcurrentEvents...) to work-around this limitation. To make this work, I've also needed to include the test file name in the build directory name, as just the test method name is not unique enough (plenty of tests have a test method called "test" or similar). While doing this, I've found a couple of tests that are taking waaay longer then they ought to (TestBreakpointCaseSensitivity -- 90 seconds), which I plan to look into in the future. Reviewers: aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43335 llvm-svn: 325322
* [Sema] Take into account the current context when checking theAkira Hatanaka2018-02-162-0/+40
| | | | | | | | | | | | accessibility of a class member. This fixes PR32898. rdar://problem/33737747 Differential revision: https://reviews.llvm.org/D36918 llvm-svn: 325321
* [ThinLTO] Import global variablesEugene Leviant2018-02-165-22/+126
| | | | | | Differential revision: https://reviews.llvm.org/D43077 llvm-svn: 325320
* [Coverage] Handle break/continue outside of loop bodiesVedant Kumar2018-02-162-8/+27
| | | | | | | | | Teach the coverage mapping logic to handle break or continue statements within for loop increments. Fixes llvm.org/PR36406. llvm-svn: 325319
* [X86] Allow CMOVs of constants to be sign extended from i32.Craig Topper2018-02-163-23/+18
| | | | | | Sign extending i32 constants only requires a REX prefix as does widening the CMOV. This is cheaper than the explicit sign extend op. llvm-svn: 325318
* [X86] Don't zero_extend cmov up to i64, stop at i32.Craig Topper2018-02-162-12/+27
| | | | | | Zero extend from i32 to i64 is free. So extend from i16 to i32, and then use a free zero extend to finish. llvm-svn: 325317
* Fix an issue that weak bit is dropped when there's a lazy object symbol.Rui Ueyama2018-02-162-2/+24
| | | | | | | | Previously, we accidentally dropped STB_WEAK bit from an undefined symbol if there is a lazy object symbol with the same name. That caused a compatibility issue with GNU gold. llvm-svn: 325316
* Reintroduce FreeBSD support in test/xrayKamil Rytarowski2018-02-161-3/+8
| | | | | | | | | | Tested by Douglas Yung. The original patch from D43278 has been reverted. New patch by myself. llvm-svn: 325315
* [ELF] Fix use after free in case of using --whole-archive.Igor Kudrin2018-02-164-3/+18
| | | | | | Differential Revision: https://reviews.llvm.org/D34554 llvm-svn: 325313
* [DOXYGEN] There was a request in the review D41507 to change the notation ↵Ekaterina Romanova2018-02-162-65/+67
| | | | | | | | for hex numbers in doxygen documentation from <...>h to 0x<...>. Both of these notations were used in x86 intrinsics documentation. I promised to change them to 0x<...> for consistency. Differential Revision: https://reviews.llvm.org/D41888 llvm-svn: 325312
* [APInt] Fix extractBits to correctly handle Result.isSingleWord() case.Tim Shen2018-02-162-1/+9
| | | | | | | | | | | | Summary: extractBits assumes that `!this->isSingleWord() implies !Result.isSingleWord()`, which may not necessarily be true. Handle both cases. Reviewers: RKSimon Subscribers: sanjoy, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D43363 llvm-svn: 325311
* Remove brittle check lines from a test, NFCVedant Kumar2018-02-161-41/+0
| | | | llvm-svn: 325310
* Revert part of SVN r. 325240 in lit.cfgKamil Rytarowski2018-02-161-9/+3
| | | | | | | | | | | | | The original change broke a llvm-clang-lld-x86_64-debian setup. This change will be investigated and reintroduced in future. Original commit: "Add Xray instrumentation support to FreeBSD" https://reviews.llvm.org/D43278 llvm-svn: 325309
* [GVN] Partially revert debug info salvage change (r325063)Vedant Kumar2018-02-162-2/+1
| | | | | | | | | | | | | In r325063, we salvaged debug values from dying instructions in GVN::processBlock() and GVN::performScalarPRE(). The change in performScalarPRE(), while correct, is unhelpful. It introduced a call to salvageDebugInfo() which was immediately followed by a RAUW, meaning it prevented the RAUW from efficiently updating dbg.value intrinsics. This commit reverts the mistake and tightens up the affected test case. llvm-svn: 325308
* Relax relocation type checking in a non-ALLOC section.Rui Ueyama2018-02-163-14/+40
| | | | | | | | | | | | | | | | | | Even though it doesn't make sense, there seems to be multiple programs in the wild that create PC-relative relocations in non-ALLOC sections. I believe this is caused by the negligence of GNU linkers to not report any errors for such relocations. Currently, lld emits warnings against such relocations and exits. So, you cannot link any program that contains wrong relocations until you fix an issue in a program that generates wrong ELF files. It's often impractical to fix a program because it's not always easy. This patch relaxes the error checking and emit a warning instead. Differential Revision: https://reviews.llvm.org/D43351 llvm-svn: 325307
* [X86] Add the test cases that were supposed to go with r325287.Craig Topper2018-02-161-0/+242
| | | | llvm-svn: 325306
* [Modules] Extend -fmodule-name semantic for frameworks with private modulesBruno Cardoso Lopes2018-02-162-4/+34
| | | | | | | | | | | | | Assume Foo.framework with two module maps and two modules Foo and Foo_Private. Framework authors need to skip building both Foo and Foo_Private when using -fmodule-name=Foo, since both are part of the framework and used interchangeably during compilation. rdar://problem/37500098 llvm-svn: 325305
* [OPENMP] Fix PR36399: Crash on C code with ordered doacross construct.Alexey Bataev2018-02-152-0/+63
| | | | | | | | | Codegen for ordered with doacross construct might produce incorrect code because of missing cleanup scope for the construct. Without this scope the final runtime function call could be emitted in the wrong order that leads to incorrect codegen. llvm-svn: 325304
* Allow 0 to be a valid value pruning interval in C LTO API. Value 0 will ↵Ekaterina Romanova2018-02-154-6/+28
| | | | | | cause garbage collector to run. This matches the behavior in C++ LTO API. llvm-svn: 325303
* [OPENMP] Fix PR38398: compiler crash on standalone pragma ordered with ↵Alexey Bataev2018-02-152-119/+118
| | | | | | | | | depend sink|source clause. Patch fixes compiler crash on standalone #pragmas ordered with depend(sink|source) clauses. llvm-svn: 325302
* [DCE] Salvage debug info from dead instsVedant Kumar2018-02-152-4/+11
| | | | | | | This results in small increases in the size of the .debug_loc section and the number of unique source variables in a stage2 build of opt. llvm-svn: 325301
* [asan] Add "arm64" into the list of 64-bit architecturesKuba Mracek2018-02-151-3/+3
| | | | | | | | It looks like get_bits_for_arch doesn't recognize "arm64" as a 64-bit architecture, and it actually matches the "arm" regexp, which marks it as 32-bit. Let's fix that by matching the 64-bit list first and addin "arm64" into the list. Differential Revision: https://reviews.llvm.org/D43155 llvm-svn: 325300
* [AMDGPU] Combine adjacent waitcounts in a single strongest waitStanislav Mekhanoshin2018-02-152-9/+45
| | | | | | Differential Revision: https://reviews.llvm.org/D43350 llvm-svn: 325299
* [include-fixer] Add more debug headers to the STL header listBenjamin Kramer2018-02-151-0/+4
| | | | | | These are used for std::map/std::set in STL debug mode. llvm-svn: 325298
* [Debugify] Don't check functions which were skippedVedant Kumar2018-02-152-1/+15
| | | | | | | If no debug info was applied to a function, its debug info shouldn't be checked (it doesn't have any :). llvm-svn: 325297
* Don't make PDBs by default in Release modeReid Kleckner2018-02-151-4/+11
| | | | | | | | | | | Introduce the LLVM_ENABLE_PDB option so that users can request them explicitly instead. Add /OPT:REF and /OPT:ICF back, which /DEBUG disables by default. Differential Revision: https://reviews.llvm.org/D43156 llvm-svn: 325296
* [X86][3DNOW] Teach decoder about AMD 3DNow! instrsRafael Auler2018-02-158-32/+156
| | | | | | | | | | | | | | | | | | | Summary: This patch makes the decoder understand old AMD 3DNow! instructions that have never been properly supported in the X86 disassembler, despite being supported in other subsystems. Hopefully this should make the X86 decoder more complete with respect to binaries containing legacy code. Reviewers: craig.topper Reviewed By: craig.topper Subscribers: llvm-commits, maksfb, bruno Differential Revision: https://reviews.llvm.org/D43311 llvm-svn: 325295
* [opt] Port the debugify passes to the new pass managerVedant Kumar2018-02-156-7/+60
| | | | llvm-svn: 325294
* Silence a -Wparentheses warning; NFC.Aaron Ballman2018-02-151-1/+1
| | | | llvm-svn: 325293
* Silence some -Wunused-variable warnings; NFC.Aaron Ballman2018-02-151-2/+2
| | | | llvm-svn: 325292
* [Coroutines] Use allocator overload when availableBrian Gesiak2018-02-155-43/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Depends on https://reviews.llvm.org/D42605. An implementation of the behavior described in `[dcl.fct.def.coroutine]/7`: when a promise type overloads `operator new` using a "placement new" that takes the same argument types as the coroutine function, that overload is used when allocating the coroutine frame. Simply passing references to the coroutine function parameters directly to `operator new` results in invariant violations in LLVM's coroutine splitting pass, so this implementation modifies Clang codegen to produce allocator-specific alloc/store/loads for each parameter being forwarded to the allocator. Test Plan: `check-clang` Reviewers: rsmith, GorNishanov, eric_niebler Reviewed By: GorNishanov Subscribers: lewissbaker, EricWF, cfe-commits Differential Revision: https://reviews.llvm.org/D42606 llvm-svn: 325291
* [X86] Enable BT to be used in place of TEST for single bit checks under optsizeCraig Topper2018-02-152-12/+15
| | | | | | | | We already do this for 64-bit when it won't fit into a 64-bit AND/TEST's immediate field. This adds an additional qualifier to do it for any single bit constant larger than 8-bits under optsize Differential Revision: https://reviews.llvm.org/D43346 llvm-svn: 325290
* [DAGCombiner] Call ExtendUsesToFormExtLoad in (zext (and (load)))->(and ↵Craig Topper2018-02-152-16/+18
| | | | | | | | | | | | | | (zextload)) even when the and does not have multiple uses Same for the sign extend case. Currently we check for multiple uses on the binop. Then we call ExtendUsesToFormExtLoad to capture SetCCs that use the load. So we only end up finding any setccs when the and has additional uses and the load is used by a setcc. I don't think the and having multiple uses is relevant here. I think we should only be checking for the load having multiple uses. This changes an NVPTX test because we now find that the load has a second use by a truncate, but ExtendUsesToFormExtLoad only looks at setccs it can extend. All other operations just check isTruncateFree. Maybe we should allow widening of an existing truncate even if its not free? Differential Revision: https://reviews.llvm.org/D43063 llvm-svn: 325289
* [Sema] Toggle diags when finding allocators (NFCI)Brian Gesiak2018-02-152-43/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Many methods in Sema take a `bool Diagnose` parameter. Examples of such methods include `Sema::FindDeallocationFunction` and `Sema::SpecialMemberIsTrivial`. Calling these methods with `Diagnose = false` allows callers to, for instance, check for the existence of a deallocation function, without that check resulting in error diagnostics being emitted if no matching deallocation function exists. Add a similar `bool Diagnose` to the `Sema::FindAllocationFunctions` method, so that checks for the existence of allocation functions can be made without triggering error diagnostics. This allows `SemaCoroutine.cpp`, in its implementation of the Coroutines TS, to check for the existence of a particular `operator new` overload, but then without error fall back to a default `operator new` if no matching overload exists. Test Plan: `check-clang` Reviewers: rsmith, GorNishanov, eric_niebler Reviewed By: GorNishanov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42605 llvm-svn: 325288
* [X86] Use btc/btr/bts to implement xor/and/or that affects a single bit in ↵Craig Topper2018-02-153-1/+37
| | | | | | | | | | | | the upper 32-bits of a 64-bit operation. We can't fold a large immediate into a 64-bit operation. But if we know we're only operating on a single bit we can use the bit instructions. For now only do this for optsize. Differential Revision: https://reviews.llvm.org/D37418 llvm-svn: 325287
* [analyzer] Suppress temporary destructors for temporary arrays.Artem Dergachev2018-02-152-3/+32
| | | | | | | | | | | | | | | Array destructors, like constructors, need to be called for each element of the array separately. We do not have any mechanisms to do this in the analyzer, so for now all we do is evaluate a single constructor or destructor conservatively and give up. It automatically causes the necessary invalidation and pointer escape for the whole array, because this is how RegionStore works. Implement this conservative behavior for temporary destructors. This fixes the crash on the provided test. Differential Revision: https://reviews.llvm.org/D43149 llvm-svn: 325286
* [Coroutines] Don't move stores for allocator argsBrian Gesiak2018-02-152-1/+80
| | | | | | | | | | | | | | | | | | | | | Summary: The behavior described in Coroutines TS `[dcl.fct.def.coroutine]/7` allows coroutine parameters to be passed into allocator functions. The instructions to store values into the alloca'd parameters must not be moved past the frame allocation, otherwise uninitialized values are passed to the allocator. Test Plan: `check-llvm` Reviewers: rsmith, GorNishanov, eric_niebler Reviewed By: GorNishanov Subscribers: compnerd, EricWF, llvm-commits Differential Revision: https://reviews.llvm.org/D43000 llvm-svn: 325285
* [analyzer] Implement path notes for temporary destructors.Artem Dergachev2018-02-152-2/+72
| | | | | | | | | | | | | | Temporary destructors fire at the end of the full-expression. It is reasonable to attach the path note for entering/leaving the temporary destructor to its CXXBindTemporaryExpr. This would not affect lifetime-extended temporaries with their automatic destructors which aren't temporary destructors. The path note may be confusing in the case of destructors after elidable copy constructors. Differential Revision: https://reviews.llvm.org/D43144 llvm-svn: 325284
* [ARM] Fix redirect in inline assembly testPablo Barrio2018-02-151-1/+1
| | | | | | | | | | | | Summary: Fix silly mistake in a test Reviewers: gkistanova, apilipenko Subscribers: javed.absar, eraman, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D43342 llvm-svn: 325283
* [analyzer] Compute the correct this-region for temporary destructors.Artem Dergachev2018-02-1510-93/+313
| | | | | | | | | | | | | | | | | | | Inline them if possible - a separate flag is added to control this. The whole thing is under the cfg-temporary-dtors flag, off by default so far. Temporary destructors are called at the end of full-expression. If the temporary is lifetime-extended, automatic destructors kick in instead, which are not addressed in this patch, and normally already work well modulo the overally broken support for lifetime extension. The patch operates by attaching the this-region to the CXXBindTemporaryExpr in the program state, and then recalling it during destruction that was triggered by that CXXBindTemporaryExpr. It has become possible because CXXBindTemporaryExpr is part of the construction context since r325210. Differential revision: https://reviews.llvm.org/D43104 llvm-svn: 325282
* [SCCP] Test that constant propagation updates debug info, NFCVedant Kumar2018-02-151-5/+17
| | | | | | | This extends an existing test to check that SCCP updates the operands of relevant dbg.value instructions as it does its work. llvm-svn: 325281
* [Utils] salvageDI: Add a comment and move a call earlier, NFCVedant Kumar2018-02-151-1/+3
| | | | llvm-svn: 325280
* Clean up AMDGCN testsYaxun Liu2018-02-1510-130/+130
| | | | | | Differential Revision: https://reviews.llvm.org/D43340 llvm-svn: 325279
* [analyzer] NFC: Eliminate ParentMap lookup in mayInlineCallKind().Artem Dergachev2018-02-153-9/+9
| | | | | | | | Don't look at the parent statement to figure out if the cxx-allocator-inlining flag should kick in and prevent us from inlining the constructor within a new-expression. We now have construction contexts for that purpose. llvm-svn: 325278
* [X86] Add test cases for opportunities for using BT instead of TEST under ↵Craig Topper2018-02-151-0/+372
| | | | | | optsize. llvm-svn: 325277
* [TSan] Fix static TLS boundaries calculations in __tls_get_addr interceptor.Alex Shlyapnikov2018-02-151-1/+2
| | | | | | | | | | | | | | Summary: DTLS_on_tls_get_addr expects (tls_addr + tls_size) as the last parameter, static_tls_end. Reviewers: dvyukov Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D43325 llvm-svn: 325276
OpenPOWER on IntegriCloud