summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* FreeBSD TSan support updateVitaly Buka2018-03-161-3/+3
| | | | | | | | | | | | | | | | | Summary: - Disable thread_finalize callback on FreeBSD, fixing couple of unit tests. Patch by David CARLIER Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: emaste, kubamracek, krytarowski, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44156 llvm-svn: 327697
* Mmap interceptor new option, Write Exec runtime detectorVitaly Buka2018-03-165-0/+47
| | | | | | | | | | | | | | | | Summary: Following-up the refactoring of mmap interceptors, adding a new common option to detect PROT_WRITE|PROT_EXEC pages request. Patch by David CARLIER Reviewers: vitalybuka, vsk Reviewed By: vitalybuka Subscribers: krytarowski, #sanitizers Differential Revision: https://reviews.llvm.org/D44194 llvm-svn: 327696
* [ARM] FP16 codegen support for VSELSjoerd Meijer2018-03-163-3/+42
| | | | | | | | | This implements lowering of SELECT_CC for f16s, which enables codegen of VSEL with f16 types. Differential Revision: https://reviews.llvm.org/D44518 llvm-svn: 327695
* Fix compilation warning introduced in r327654Mikael Holmen2018-03-161-1/+1
| | | | | | | | | | | | | | The compiler complained about ../tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:184:15: error: unused variable 'CSI' [-Werror,-Wunused-variable] if (auto *CSI = CGF.CapturedStmtInfo) { ^ 1 error generated. I don't know this code but it seems like an easy fix so I push it anyway to get rid of the warning. llvm-svn: 327694
* [NFC] Void variables used for asserts onlyMax Kazantsev2018-03-161-0/+2
| | | | llvm-svn: 327693
* Skip more lldb-mi tests which time out on DarwinVedant Kumar2018-03-161-0/+3
| | | | | | Bot failure: https://ci.swift.org/job/oss-lldb-incremental-osx/1097/testReport/junit/TestMiTarget/MiTargetTestCase/test_lldbmi_target_attach_wait_for/ llvm-svn: 327692
* [cmake] Copy system debugserver from the right place when only CommandLineToolsVedant Kumar2018-03-161-2/+9
| | | | | | | | | | | | | | | | | | | are installed Instead of building debugserver when building lldb, I'd rather pass LLDB_CODESIGN_IDENTITY="" to cmake and use the one already on my system. However, on one of my machines I only have the CommandLineTools installed, and so the hardcoded path to the system debugserver does not work for me. Additionally, we should verify the LLDB framework exists on the machine before trying to set the path to debugserver. This allows us to warn the user at configure time that a system debugserver can't be found if they choose not to build it themselves. Patch by Alex Langford! Differential Revision: https://reviews.llvm.org/D44507 llvm-svn: 327691
* [demangler] Support for <template-param>s in generic lambdas.Erik Pilkington2018-03-162-13/+17
| | | | | | | These <template-param>s refer to "artifical" <template-arg>s that don't appear in the mangled name, so we just print them as "auto". llvm-svn: 327690
* [InstCombine] add more tests for fcmp+select -> fabs; NFCSanjay Patel2018-03-161-11/+160
| | | | | | | This should correspond to the patterns in D44091 and might make handling these in the DAG unnecessary. llvm-svn: 327689
* Revert r327248, "For most Targets the _GLOBAL_OFFSET_TABLE_ symbol is ↵Peter Collingbourne2018-03-1617-85/+42
| | | | | | | | | | | expected to be at" This change broke ARM code that expects to be able to add _GLOBAL_OFFSET_TABLE_ to the result of an R_ARM_REL32. I will provide a reproducer on llvm-commits. llvm-svn: 327688
* [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2018-03-163-345/+341
| | | | | | other minor fixes (NFC). llvm-svn: 327687
* [X86][Btver2] Add support for multiple pipelines stages for x86 scalar ↵Simon Pilgrim2018-03-151-22/+11
| | | | | | | | schedules. NFCI. This allows us to use JWriteResIntPair for complex schedule classes (like WriteIDiv) as well as single pipe instructions. llvm-svn: 327686
* [X86][Btver2] Tweak pipes test to remove register dependenciesSimon Pilgrim2018-03-151-34/+34
| | | | | | It gives us a better view of pipe usage in the timeline which is what the test is trying to show. llvm-svn: 327685
* Fix linker script operator precedence.Rui Ueyama2018-03-152-5/+10
| | | | | | | | | | | "&" should have higher priority than "|" [1]. Previously, they had the same priority. [1] https://sourceware.org/binutils/docs/ld/Operators.html Differential Revision: https://reviews.llvm.org/D43880 llvm-svn: 327684
* [SelectionDAG][ARM][X86] Teach PromoteIntRes_SETCC to do a better job ↵Craig Topper2018-03-155-341/+434
| | | | | | | | | | | | | | | | picking the result type for the setcc. Previously if getSetccResultType returned an illegal type we just fell back to using the default promoted type. This appears to have been to handle the case where for vectors getSetccResultType returns the input type, but the input type itself isn't legal and will need to be promoted. Without the legality check we would never reach a legal type. But just picking the promoted type to be the setcc type can create strange setccs where the result type is 128 bits and the operand type is 256 bits. If for example the result type was promoted to v8i16 from v8i1, but the input type was promoted from v8i23 to v8i32. We currently handle this with custom lowering code in X86. This legality check also caused us reject the getSetccResultType when the input type needed to be widened or split. Even though that result wouldn't have caused legalization to get stuck. This patch tries to fix this by detecting the getSetccResultType needs to be promoted. If its input type also needs to be promoted we'll try a ask for a new setcc result type based on its eventual promoted value. Otherwise we fall back to default type to promote to. For any other illegal values we might get back from the initial call to getSetccResultType we just keep and allow it to be re-legalized later via splitting or widening or scalarizing. llvm-svn: 327683
* [X86][Btver2] Fix ymm div/sqrt to use fmul unitSimon Pilgrim2018-03-152-39/+38
| | | | | | | | YMM FDiv/FSqrt are dispatched on pipe JFPU1 but should be performed on the JFPM unit - that is where most of the cycles are spent. This matches the pipes for WriteFSqrt/WriteFDiv definitions. llvm-svn: 327682
* Use standard `print(dbgs())` pattern to implement DebugLoc::dumpSean Silva2018-03-151-13/+1
| | | | | | The open-coded implementation had a bug. It didn't print filenames. llvm-svn: 327681
* [InstCombine] add tests for fcmp+select -> fabs; NFCSanjay Patel2018-03-151-24/+57
| | | | llvm-svn: 327680
* Fix PDB injected sources test.Zachary Turner2018-03-152-5/+15
| | | | | | | | | This test was originally disabled because it was failing on a bot. It turns out I had run dos2unix on the file, and that removed a necessary byte from the file. I'm just recomitting the proper file and updating the test to test a little bit more now. llvm-svn: 327679
* MSan, FreeBSD few tests fixesVitaly Buka2018-03-152-2/+13
| | | | | | | | | | | | | | | | Summary: pthread_getattr_np_deadlock support pthread_getname_np unsupported Reviewers: krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: eugenis, srhines, krytarowski, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44085 llvm-svn: 327678
* OpenBSD UBsan support procmapsVitaly Buka2018-03-154-9/+144
| | | | | | | | | | | | | | | | Summary: procmaps OpenBSD specifics Patch by David CARLIER Reviewers: krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: mgorny, emaste, kubamracek, fedor.sergeev, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44050 llvm-svn: 327677
* [X86][Btver2] Add test to show timeline of fpu instructions on different ↵Simon Pilgrim2018-03-151-0/+114
| | | | | | | | pipes/units Try to demonstrate the scheduling from fpu0/fpu1 pipes to the valu0/vimul/fpa or valu1/stc/fpm functional units llvm-svn: 327676
* [PDB] Fix a bug where we were serializing hash tables incorrectly.Zachary Turner2018-03-152-7/+16
| | | | | | | | | | | There was some code that tried to calculate the number of 4-byte words required to hold N bits, but it was instead computing the number of bytes required to hold N bits. This was leading to extraneous data being output into the hash table, which would cause certain operations in DIA (the Microsoft PDB reader) to fail. llvm-svn: 327675
* OpenBSD UBsan support common functionsVitaly Buka2018-03-152-69/+107
| | | | | | | | | | | | | | | | Summary: Ripped off OpenBSD specific from the common Linux implementation Patch by David Carlier Reviewers: krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: emaste, srhines, kubamracek, fedor.sergeev, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44036 llvm-svn: 327674
* [WebAssembly] Add DebugLoc information to WebAssembly block and loop.Derek Schuff2018-03-154-8/+161
| | | | | | | Patch by Yury Delendik Differential Revision: https://reviews.llvm.org/D44448 llvm-svn: 327673
* [NVPTX] TblGen-ized lowering of WMMA intrinsics.Artem Belevich2018-03-155-620/+155
| | | | | | | | NFC. Differential Revision: https://reviews.llvm.org/D43151 llvm-svn: 327672
* [LoopUnroll] Peel off iterations if it makes conditions true/false.Florian Hahn2018-03-155-7/+705
| | | | | | | | | | | | | | | If the loop body contains conditions of the form IndVar < #constant, we can remove the checks by peeling off #constant iterations. This improves codegen for PR34364. Reviewers: mkuper, mkazantsev, efriedma Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D43876 llvm-svn: 327671
* Re-land r327620 "[CodeView] Initial support for emitting S_BLOCK32 symbols ↵Reid Kleckner2018-03-155-14/+514
| | | | | | | | | for lexical scopes" This is safe to land now that we don't copy FunctionInfo when rehashing the DenseMap. llvm-svn: 327670
* [codeview] Fix sense of the assertion about hashtable insertionReid Kleckner2018-03-151-1/+1
| | | | llvm-svn: 327669
* COFF: Implement string tail merging.Peter Collingbourne2018-03-157-5/+184
| | | | | | | | | | | | | | | | | | In COFF, duplicate string literals are merged by placing them in a comdat whose leader symbol name contains a specific prefix followed by the hash and partial contents of the string literal. This gives us an easy way to identify sections containing string literals in the linker: check for leader symbol names with the given prefix. Any sections that are identified in this way as containing string literals may be tail merged. We do so using the StringTableBuilder class, which is also used to tail merge string literals in the ELF linker. Tail merging is enabled only if ICF is enabled, as this provides a signal as to whether the user cares about binary size. Differential Revision: https://reviews.llvm.org/D44504 llvm-svn: 327668
* COFF: Move assignment of section RVAs to assignAddresses(). NFCI.Peter Collingbourne2018-03-154-43/+26
| | | | | | | | | | This makes the design a little more similar to the ELF linker and should allow for features such as ARM range extension thunks to be implemented more easily. Differential Revision: https://reviews.llvm.org/D44501 llvm-svn: 327667
* Fix structure alignment issue.Zachary Turner2018-03-151-4/+0
| | | | llvm-svn: 327666
* [codeview] Delete FunctionInfo copy ctor and move out of DenseMapReid Kleckner2018-03-152-5/+11
| | | | | | | | | | | | | We were unnecessarily copying a bunch of these FunctionInfo objects around when rehashing the DenseMap. Furthermore, r327620 introduced pointers referring to objects owned by FunctionInfo, and the default copy ctor did the wrong thing in this case, leading to use-after-free when the DenseMap gets rehashed. I will rebase r327620 on this next and recommit it. llvm-svn: 327665
* [LICM] Ignore exits provably not taken on first iteration when computing ↵Philip Reames2018-03-153-1/+347
| | | | | | | | | | | | | | | | must execute It is common to have conditional exits within a loop which are known not to be taken on some iterations, but not necessarily all. This patches extends our reasoning around guaranteed to execute (used when establishing whether it's safe to dereference a location from the preheader) to handle the case where an exit is known not to be taken on the first iteration and the instruction of interest *is* known to be taken on the first iteration. This case comes up in two major ways: * If we have a range check which we've been unable to eliminate, we frequently know that it doesn't fail on the first iteration. * Pass ordering. We may have a check which will be eliminated through some sequence of other passes, but depending on the exact pass sequence we might never actually do so or we might miss other optimizations from passes run before the check is finally eliminated. The initial version (here) is implemented via InstSimplify. At the moment, it catches a few cases, but misses a lot too. I added test cases for missing cases in InstSimplify which I'll follow up on separately. Longer term, we should probably wire SCEV through to here to get much smarter loop aware simplification of the first iteration predicate. Differential Revision: https://reviews.llvm.org/D44287 llvm-svn: 327664
* [AArch64] Adjust the cost model for Exynos M3Evandro Menezes2018-03-151-2/+2
| | | | | | Fix typo. llvm-svn: 327663
* [AArch64] Adjust the cost model for Exynos M3Evandro Menezes2018-03-151-0/+7
| | | | | | Add special case for rotate right. llvm-svn: 327662
* [AArch64] Adjust the cost model for Exynos M3Evandro Menezes2018-03-152-12/+59
| | | | | | Increase the number of cheap as move cases of register reset. llvm-svn: 327661
* [X86] Make sure we use FSUB instruction as the reference for operand order ↵Craig Topper2018-03-152-9/+31
| | | | | | | | in isAddSubOrSubAdd when recognizing subadd The FADD part of the addsub/subadd pattern can have its operands commuted, but when checking for fsubadd we were using the fadd as reference and commuting the fsub node. llvm-svn: 327660
* [X86] Add test case showing bad fmsubadd creation due to bad commuting.Craig Topper2018-03-151-0/+19
| | | | | | The code that creates fmsubadd from shuffle vector has some code to allow commuting the operands of the fadd node. This code was originally created when we only recognized fmaddsub. When fmsubadd support was added this code was not updated and is now commuting the fsub operands instead. llvm-svn: 327659
* Remove empty fileDavid Blaikie2018-03-151-13/+0
| | | | | | | I should've deleted this in r320768 but accidentally just deleted its contents instead. llvm-svn: 327658
* Revert r327620 "[CodeView] Initial support for emitting S_BLOCK32 symbols ↵Reid Kleckner2018-03-154-510/+14
| | | | | | | | | | for lexical scopes" It is causing crashes when compiling Chrome in debug mode. I'll try to debug it in a second. llvm-svn: 327657
* [LV] Test commit. Removing white space.Diego Caballero2018-03-151-1/+1
| | | | | | This is just to check that I have commit access privilege. llvm-svn: 327656
* [EarlyCSE] Don't hide earler invariant.scopesPhilip Reames2018-03-153-3/+41
| | | | | | | | If we've already established an invariant scope with an earlier generation, we don't want to hide it in the scoped hash table with one with a later generation. I noticed this when working on the invariant-load handling, but it also applies to the invariant.start case as well. Without this change, my previous patch for invariant-load regresses some cases, so I'm pushing this without waiting for review. This is why you don't make last minute tweaks to patches to catch "obvious cases" after it's already been reviewed. Bad Philip! llvm-svn: 327655
* [OPENMP, NVPTX] Improve globalization of the variables captured by value.Alexey Bataev2018-03-155-90/+269
| | | | | | | | | | | | | If the variable is captured by value and the corresponding parameter in the outlined function escapes its declaration context, this parameter must be globalized. To globalize it we need to get the address of the original parameter, load the value, store it to the global address and use this global address instead of the original. Patch improves globalization for parallel|teams regions + functions in declare target regions. llvm-svn: 327654
* Move some function declarations higher so they can be found.Zachary Turner2018-03-151-3/+3
| | | | llvm-svn: 327653
* Add missing #includes.Zachary Turner2018-03-151-0/+2
| | | | llvm-svn: 327652
* [PPC] Avoid non-simple MVT in STBRX optimizationGuozhi Wei2018-03-152-1/+23
| | | | | | | | | | PR35402 triggered this case. It bswap and stores a 48bit value, current STBRX optimization transforms it into STBRX. Unfortunately 48bit is not a simple MVT, there is no PPC instruction to support it, and it can't be automatically expanded by llvm, so caused a crash. This patch detects the non-simple MVT and returns early. Differential Revision: https://reviews.llvm.org/D44500 llvm-svn: 327651
* [X86][Btver2] Attach AES/CLMUL instructions to a scheduler pipeSimon Pilgrim2018-03-151-4/+4
| | | | llvm-svn: 327650
* [X86] Simplify the type legality checking for (FM)ADDSUB/SUBADD matching. NFCICraig Topper2018-03-151-9/+7
| | | | | | Rather than enumerating all specific types, for the DAG combine we can just use TLI::isTypeLegal and an SSE3 check. For the BUILD_VECTOR version we already know the type is legal so we just need to check SSE3. llvm-svn: 327649
* [X86] Fix 80 column violations.Craig Topper2018-03-151-2/+4
| | | | llvm-svn: 327648
OpenPOWER on IntegriCloud