summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clangd] Fix a syntax error on the test.Haojian Wu2018-12-191-1/+1
| | | | llvm-svn: 349632
* [X86][SSE] Auto upgrade PADDUS/PSUBUS intrinsics to UADD_SAT/USUB_SAT ↵Simon Pilgrim2018-12-195-133/+44
| | | | | | | | | | generic intrinsics (clang) Sibling patch to D55855, this emits UADD_SAT/USUB_SAT generic intrinsics for the SSE saturated math intrinsics instead of expanding to a IR code sequence that could be difficult to reassemble. Differential Revision: https://reviews.llvm.org/D55879 llvm-svn: 349631
* [X86][SSE] Auto upgrade PADDUS/PSUBUS intrinsics to UADD_SAT/USUB_SAT ↵Simon Pilgrim2018-12-195-348/+184
| | | | | | | | | | | | | | generic intrinsics (llvm) Now that we use the generic ISD opcodes, we can use the generic intrinsics directly as well. This fixes the poor fast-isel codegen by not expanding to an easily broken IR code sequence. I'm intending to deal with the signed saturation equivalents as well. Clang counterpart: https://reviews.llvm.org/D55879 Differential Revision: https://reviews.llvm.org/D55855 llvm-svn: 349630
* [SelectionDAG] Optional handling of UNDEF elements in matchBinaryPredicate ↵Simon Pilgrim2018-12-192-12/+6
| | | | | | | | | | | | | | (part 2 of 2) Now that SimplifyDemandedBits/SimplifyDemandedVectorElts is simplifying vector elements, we're seeing more constant BUILD_VECTOR containing undefs. This patch provides opt-in support for UNDEF elements in matchBinaryPredicate, passing NULL instead of the result ConstantSDNode* argument. I've updated the (or (and X, c1), c2) -> (and (or X, c2), c1|c2) fold to demonstrate its use, which I believe is safe for undef cases. Differential Revision: https://reviews.llvm.org/D55822 llvm-svn: 349629
* [SelectionDAG] Optional handling of UNDEF elements in matchBinaryPredicate ↵Simon Pilgrim2018-12-192-9/+17
| | | | | | | | | | | | (part 1 of 2) Now that SimplifyDemandedBits/SimplifyDemandedVectorElts is simplifying vector elements, we're seeing more constant BUILD_VECTOR containing undefs. This patch provides opt-in support for UNDEF elements in matchBinaryPredicate, passing NULL instead of the result ConstantSDNode* argument. Differential Revision: https://reviews.llvm.org/D55822 llvm-svn: 349628
* Portable Python script across Python versionSerge Guelton2018-12-194-11/+20
| | | | | | | | | urllib2 as been renamed into urllib and the library layout has changed. Workaround that in a consistent manner. Differential Revision: https://reviews.llvm.org/D55199 llvm-svn: 349627
* [Index] Index paremeters in lambda expressions.Haojian Wu2018-12-192-0/+14
| | | | | | | | | | | | Summary: This fixes clangd couldn't find references for lambda parameters. Reviewers: ilya-biryukov Subscribers: ioeric, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D55437 llvm-svn: 349626
* [TargetLowering] Fix propagation of undefs in zero extension ops (PR40091)Simon Pilgrim2018-12-194-15/+34
| | | | | | | | | | | | As described on PR40091, we have several places where zext (and zext_vector_inreg) fold an undef input into an undef output. For zero extensions this is incorrect as the output should guarantee to least have the new upper bits set to zero. SimplifyDemandedVectorElts is the worst offender (and its the most likely to cause new undefs to appear) but DAGCombiner's tryToFoldExtendOfConstant has a similar issue. Thanks to @dmgreen for catching this. Differential Revision: https://reviews.llvm.org/D55883 llvm-svn: 349625
* Let TableGen write output only if it changed, instead of doing so in cmake, ↵Nico Weber2018-12-193-29/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | attempt 2 This relands r330742: """ Let TableGen write output only if it changed, instead of doing so in cmake. Removes one subprocess and one temp file from the build for each tablegen invocation. No intended behavior change. """ In particular, if you see rebuilds after this change that you didn't see before this change, that's unintended and it's fine to revert this change again (but let me know). r330742 got reverted because some people reported that llvm-tblgen ran on every build after it. This could happen if the depfile output got deleted without deleting the main .inc output. To fix, make TableGen always write the depfile, but keep writing the main .inc output only if it has changed. This matches what we did in cmake before. Differential Revision: https://reviews.llvm.org/D55842 llvm-svn: 349624
* [clang-tidy] use "const SourceManager&" parameter, NFC.Haojian Wu2018-12-191-3/+3
| | | | llvm-svn: 349623
* Fix test MC/AMDGPU/reloc.sNicolai Haehnle2018-12-191-2/+2
| | | | | | | Missed this change in r349620 Change-Id: I5123e31ed4bb99ad6903b9ede4de4dbe2cc6d453 llvm-svn: 349622
* [X86][SSE] Remove use of SSE ADDS/SUBS saturation intrinsics from ↵Simon Pilgrim2018-12-196-64/+64
| | | | | | | | | | schedule/stack tests These are due to be upgraded soon, but good to replace them with generic llvm sadd_sat/ssub_sat intrinsics now. The avx512 masked cases need doing as well but require a bit of tidyup first. llvm-svn: 349621
* AMDGPU: Use an ABS32_LO relocation for SCRATCH_RSRC_DWORD1Nicolai Haehnle2018-12-192-4/+6
| | | | | | | | | | | | | | | | | | | Summary: Using HI here makes no logical sense, since the dword is only 32 bits to begin with. Current Mesa master does not look at the relocation type at all, so this change is fine. Future Mesa will rely on this, however. Change-Id: I91085707834c4ac0370926602b93c94b90e44cb1 Reviewers: arsenm, rampitec, mareko Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D55369 llvm-svn: 349620
* Reimplement Thread Static Data ASan routines with TLSKamil Rytarowski2018-12-191-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Thread Static Data cannot be used in early init on NetBSD and FreeBSD. Reuse the ASan TSD API for compatibility with existing code with an alternative implementation using Thread Local Storage. New version uses Thread Local Storage to store a pointer with thread specific data. The destructor from TSD has been replaced with a TLS destrucutor that is called upon thread exit. Reviewers: joerg, vitalybuka, jfb Reviewed By: vitalybuka Subscribers: dim, emaste, ro, jfb, devnexen, kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55596 llvm-svn: 349619
* [clangd] Unify path canonicalizations in the codebaseKadir Cetinkaya2018-12-195-76/+64
| | | | | | | | | | | | | | Summary: There were a few different places where we canonicalized paths, each one had its own flavor. This patch tries to unify them all under one place. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55818 llvm-svn: 349618
* [llvm-objdump] - Fix one more BB.George Rimar2018-12-191-1/+4
| | | | | | | | | Should fix the http://lab.llvm.org:8011/builders/polly-amd64-linux/builds/25876/steps/build/logs/stdio: /home/grosser/buildslave/polly-amd64-linux/llvm.src/tools/llvm-objdump/llvm-objdump.cpp:539:25: error: conditional expression is ambiguous; 'std::string' (aka 'basic_string<char>') can be converted to 'typename std::remove_reference<StringRef>::type' (aka 'llvm::StringRef') and vice versa Target = Demangle ? demangle(*SymName) : *SymName; llvm-svn: 349617
* [SelectionDAG] Optional handling of UNDEF elements in matchUnaryPredicateSimon Pilgrim2018-12-195-30/+25
| | | | | | | | | | | | Now that SimplifyDemandedBits/SimplifyDemandedVectorElts are simplifying vector elements, we're seeing more constant BUILD_VECTOR containing UNDEFs. This patch provides opt-in handling of UNDEF elements in matchUnaryPredicate, passing NULL instead of the ConstantSDNode* argument. I've updated SelectionDAG::simplifyShift to demonstrate its use. Differential Revision: https://reviews.llvm.org/D55819 llvm-svn: 349616
* [X86][SSE] Remove SSE ADDUS/SUBUS saturation intrinsics from schedule/stack ↵Simon Pilgrim2018-12-196-64/+64
| | | | | | | | | | tests These are already being autoupgraded, currently to an IR sequence, but best to replace them with generic llvm uadd_sat/usub_sat intrinsics (which D55855 will be doing shortly anyhow). The avx512 masked cases need doing as well but require a bit of tidyup first. llvm-svn: 349615
* [llvm-objdump] - Fix BB.George Rimar2018-12-191-16/+15
| | | | | | Move the helper method before the first incocation in the file. llvm-svn: 349614
* [llvm-objdump] - Demangle the symbols when printing symbol table and ↵George Rimar2018-12-192-27/+51
| | | | | | | | | | | | | | | relocations. This is https://bugs.llvm.org/show_bug.cgi?id=40009, llvm-objdump does not demangle the symbols when prints symbol table and/or relocations. Patch teaches it to do that. Differential revision: https://reviews.llvm.org/D55821 llvm-svn: 349613
* [LLD][ELF] - Report a location for symbols from the linker script when ↵George Rimar2018-12-192-2/+30
| | | | | | | | | | | | | | | | | | | reporting an error. When we report an error for symbols defined in the linker script, we do not report the location properly. For example: ld.lld: error: relocation R_AARCH64_CALL26 cannot refer to absolute symbol: aliasto__text >>> defined in <internal> >>> referenced by rtoabs.o:(.text+0x4) This patch fixes that. Differential revision: https://reviews.llvm.org/D55360 llvm-svn: 349612
* AMDGPU/InsertWaitcnts: Update VGPR/SGPR bounds when brackets are mergedCarl Ritson2018-12-192-8/+67
| | | | | | | | | | | | | | | | | | Summary: Fix an issue where VGPR/SGPR bounds are not properly extended when brackets are merged. This manifests as missing waitcnt insertions when multiple brackets are forwarded to a successor block and the first forward has lower VGPR/SGPR bounds. Irreducible loop test has been extended based on a CTS failure detected for GFX9. Reviewers: nhaehnle Reviewed By: nhaehnle Subscribers: arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D55602 llvm-svn: 349611
* [ARM GlobalISel] Support G_CONSTANT for Thumb2Diana Picus2018-12-197-183/+607
| | | | | | | | | | | All we have to do is mark it as legal. This allows us to select a lot of new patterns handled by TableGen. This patch adds tests for them and splits up the existing test file for binary operators into 2 files, one for arithmetic ops and one for logical ones. llvm-svn: 349610
* tsan: align default value of detect_deadlocks flag with actual behaviorDmitry Vyukov2018-12-194-9/+8
| | | | | | | | | | | | | | I tricked myself into thinking that deadlock detection is off by default in TSan by looking at the default value of the detect_deadlocks flag and outdated docs. (Created a pull request to update docs.) I even managed to confuse others: https://groups.google.com/forum/#!topic/thread-sanitizer/xYvnAYwtoDk However, the default value is overwritten in code (TSan_flags.cc:InitializeFlags). The TSan/deadlock tests also rely on this This changes aligns the default value of the flag with the actual default behavior. Author: yln (Julian Lettner) Reviewed in: https://reviews.llvm.org/D55846 llvm-svn: 349609
* AMDGPU/GlobalISel: Regbankselect for fsubMatt Arsenault2018-12-192-0/+70
| | | | llvm-svn: 349608
* refactor testsuite spawnLldbMi args->exe+argsJan Kratochvil2018-12-194-12/+15
| | | | | | | | | | | | | | | | | Currently spawnLldbMi accepts both lldb-mi options and executable to debug as a single parameter. Split them. As in D55859 we will need to execute one lldb-mi command before loading the exe. Therefore we can no longer use the exe as lldb-mi command-line parameter as then there is no way to execute a command before loading exe specified as lldb-mi command-line parameter. LocateExecutableSymbolFileDsym should be static, that is also a little refactorization. Differential Revision: https://reviews.llvm.org/D55858 llvm-svn: 349607
* [llvm-objcopy] [COFF] Fix the Object forward declarationMartin Storsjo2018-12-192-2/+2
| | | | | | This fixes build warnings with clang, and linker errors with MSVC. llvm-svn: 349606
* [llvm-objcopy] Initial COFF supportMartin Storsjo2018-12-1916-0/+1531
| | | | | | | | | This is an initial implementation of no-op passthrough copying of COFF with objcopy. Differential Revision: https://reviews.llvm.org/D54939 llvm-svn: 349605
* Use "EvaluateAsRValue" instead of as a known int, because if it's not a knownBill Wendling2018-12-191-6/+6
| | | | | | integer we want to emit a diagnostic instead of asserting. llvm-svn: 349604
* Revert accidentally included code.Bill Wendling2018-12-191-8/+8
| | | | llvm-svn: 349603
* [DebugInfo] Make AsmPrinter struct HandlerInfo and Handlers protectedYonghong Song2018-12-191-0/+3
| | | | | | | | | | | | In AsmPrinter, make struct HandlerInfo and SmallVector Handlers protected, so target extended AsmPrinter will be able to add their own handlers. Signed-off-by: Yonghong Song <yhs@fb.com> Differential Revision: https://reviews.llvm.org/D55756 llvm-svn: 349602
* [bugpoint][PR29027] Reduce function attributesBrian Gesiak2018-12-194-0/+139
| | | | | | | | | | | | | | | | | | | | | Summary: In addition to reducing the functions in an LLVM module, bugpoint now reduces the function attributes associated with each of the remaining functions. To test this, add a -bugpoint-crashfuncattr test pass, which crashes if a function in the module has a "bugpoint-crash" attribute. A test case demonstrates that the IR is reduced to just that one attribute. Reviewers: MatzeB, silvas, davide, reames Reviewed By: reames Subscribers: reames, llvm-commits Differential Revision: https://reviews.llvm.org/D55216 llvm-svn: 349601
* Fix use-after-free with profile remapping.Richard Smith2018-12-192-0/+8
| | | | | | | | We need to keep the underlying profile reader alive as long as the profile data, because the profile data may contain StringRefs referring to strings in the reader's name table. llvm-svn: 349600
* [PowerPC]Exploit P9 vabsdu for unsigned vselect patternsKewen Lin2018-12-193-36/+150
| | | | | | | | | | | | For type v4i32/v8ii16/v16i8, do following transforms: (vselect (setcc a, b, setugt), (sub a, b), (sub b, a)) -> (vabsd a, b) (vselect (setcc a, b, setuge), (sub a, b), (sub b, a)) -> (vabsd a, b) (vselect (setcc a, b, setult), (sub b, a), (sub a, b)) -> (vabsd a, b) (vselect (setcc a, b, setule), (sub b, a), (sub a, b)) -> (vabsd a, b) Differential Revision: https://reviews.llvm.org/D55812 llvm-svn: 349599
* [gn build] Add build file for llvm-objcopyNico Weber2018-12-192-0/+63
| | | | | | | | | | Needed by check-lld. This should've been part of r349486 but I messed up. Differential Revision: https://reviews.llvm.org/D55831 llvm-svn: 349598
* Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen"Alexandre Ganea2018-12-191-0/+6
| | | | | | | | | Previously, when compiling Visual Studio targets, one could see random build errors. This was caused by tablegen projects using the same build folders. This workaround simply chains tablegen projects. Differential Revision: https://reviews.llvm.org/D54153 llvm-svn: 349596
* Add llvm-objdump man pageEd Maste2018-12-191-0/+197
| | | | | | Differential Revision: https://reviews.llvm.org/D54864 llvm-svn: 349595
* [asan] Disable ODR test on AndroidVitaly Buka2018-12-191-0/+3
| | | | llvm-svn: 349585
* Use unique_ptr to manage a TarWriter instance. NFC.Rui Ueyama2018-12-183-4/+3
| | | | llvm-svn: 349581
* Don't forget to free the libcompression scratch buffer in the dtor.Jason Molenda2018-12-181-0/+3
| | | | llvm-svn: 349580
* [lit] Rather than including stdio.h, forward-declare printf in ↵Stella Stamenova2018-12-181-1/+1
| | | | | | TestConvenienceVariables.test llvm-svn: 349573
* Remove the zlib CFLAGS and LDFLAGS settings from the xcode project file.Jason Molenda2018-12-181-48/+0
| | | | | | | | | We're linking against libcompression all the time now, we don't need to fall back to zlib. zlib support will still be used when lldb is built on linux et al systems, so I'm not removing any of the source support, but when built on darwin with xcode, we'll be using libcompression. llvm-svn: 349572
* Fix error message.Rui Ueyama2018-12-181-2/+1
| | | | | | | | | | Previously, this code printed out an error message like this ld.lld: error: --reproduce: failed to open /foo: cannot open /foo Apparently "failed to open /foo:" part is redundant. llvm-svn: 349571
* [Driver] Also obey -nostdlib++ when rewriting -lstdc++.Dan Albert2018-12-182-1/+12
| | | | | | | | | | | | Reviewers: pirama Reviewed By: pirama Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55856 llvm-svn: 349570
* [AArch64] Simplify the Exynos M3 pipeline modelEvandro Menezes2018-12-181-12/+9
| | | | llvm-svn: 349569
* [AArch64] Fix instructions order (NFC)Evandro Menezes2018-12-181-4/+4
| | | | llvm-svn: 349568
* [llvm-mca] Improve test (NFC)Evandro Menezes2018-12-181-18/+56
| | | | | | Add more instruction variations for Exynos. llvm-svn: 349567
* Portability fix: add missing includes and static_casts. Reviewed as ↵Marshall Clow2018-12-1823-4/+34
| | | | | | https://reviews.llvm.org/D55777. Thanks to Andrey Maksimov for the patch. llvm-svn: 349566
* [NativePDB] Correctly reconstruct DeclContext for nested enums.Zachary Turner2018-12-183-4/+19
| | | | | | | | | | | | We reconstruct the AST hierarchy by trying to hack up a mangled name for the parent type using the child type's mangled name. This was failing for enums because their tag type is represented with two letters ("W4") instead of one letter ("T", "U", etc) as it is with classes, structs, and unions. After accounting for this we can now correctly determine when an enum is nested inside of a namespace or a class. llvm-svn: 349565
* [DebugInfo] Move several private headers to include directoryYonghong Song2018-12-1811-22/+22
| | | | | | | | | | | | | | | | | This patch moved the following files in lib/CodeGen/AsmPrinter/ AsmPrinterHandler.h DbgEntityHistoryCalculator.h DebugHandlerBase.h to include/llvm/CodeGen directory. Such a change will enable Target to extend DebugHandlerBase and emit Target specific debug info sections. Signed-off-by: Yonghong Song <yhs@fb.com> Differential Revision: https://reviews.llvm.org/D55755 llvm-svn: 349564
OpenPOWER on IntegriCloud