summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a new interceptors for statvfs1(2) and fstatvfs1(2) from NetBSDKamil Rytarowski2018-12-073-1/+94
| | | | | | | | | | | | | | | | | | | | | Summary: statvfs1, fstatvfs1 - get file system statistics. While there, use file descriptor related macros in the fstatvfs interceptor. Add a dedicated test. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: dvyukov, kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55031 llvm-svn: 348656
* [Hexagon] Fix post-ra expansion of PS_wselectKrzysztof Parzyszek2018-12-072-1/+13
| | | | llvm-svn: 348655
* Add a new interceptor for fparseln(3) from NetBSDKamil Rytarowski2018-12-073-0/+51
| | | | | | | | | | | | | | | | | | | Summary: fparseln - returns the next logical line from a stream. Add a dedicated test for this API. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55019 llvm-svn: 348654
* [libcxx] Remove the availability_markup LIT featureLouis Dionne2018-12-0712-76/+60
| | | | | | | It is now equivalent to the 'availability' LIT feature, so there's no reason to keep both. llvm-svn: 348653
* clang-format LLVM.h (NFC)Heejin Ahn2018-12-071-54/+54
| | | | | | | | | | | | | | Summary: - LLVM style does not indent inside namespaces - Alphabetize Reviewers: ruiu Subscribers: sbc100, llvm-commits Differential Revision: https://reviews.llvm.org/D55406 llvm-svn: 348652
* Add new interceptor for strtonum(3)Kamil Rytarowski2018-12-073-0/+78
| | | | | | | | | | | | | | | | | | | | | | | Summary: strtonum(3) reliably convertss string value to an integer. This function is used in OpenBSD compat namespace and is located inside NetBSD's libc. Add a dedicated test for this interface. It's a reworked version of the original code by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54527 llvm-svn: 348651
* [ModuleSummary] use StringRefs to avoid a redundant copy; NFCGeorge Burgess IV2018-12-072-2/+2
| | | | | | | | `Saver` is a StringSaver, which has a few overloads of `save` that all ultimately just call `StringRef save(StringRef)`. Just take a StringRef here instead of building up a std::string to convert it to a StringRef. llvm-svn: 348650
* Fix unused variable warning. NFCI.Simon Pilgrim2018-12-071-2/+2
| | | | llvm-svn: 348649
* [WebAssembly] clang-format/clang-tidy AsmParser (NFC)Heejin Ahn2018-12-071-60/+88
| | | | | | | | | | | | | | | | | | | Summary: - LLVM clang-format style doesn't allow one-line ifs. - LLVM clang-tidy style says method names should start with a lowercase letter. But currently WebAssemblyAsmParser's parent class MCTargetAsmParser is mixing lowercase and uppercase method names itself so overridden methods cannot be renamed now. - Changed else ifs after returns to ifs. - Added some newlines for readability. Reviewers: aardappel, sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D55350 llvm-svn: 348648
* Delete registerScope functionHeejin Ahn2018-12-071-20/+2
| | | | | | `unregisterScope()` is not currently used, so removing it. llvm-svn: 348647
* Follow-up from r348441 to add the rest of the objc ARC intrinsics.Pete Cooper2018-12-073-0/+105
| | | | | | This adds the other intrinsics used by ARC and codegen's them to their respective runtime methods. llvm-svn: 348646
* [MemCpyOpt] memset->memcpy forwarding with undef tailNikita Popov2018-12-073-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently memcpyopt optimizes cases like memset(a, byte, N); memcpy(b, a, M); to memset(a, byte, N); memset(b, byte, M); if M <= N. Often this allows further simplifications down the line, which drop the first memset entirely. This patch extends this optimization for the case where M > N, but we know that the bytes a[N..M] are undef due to alloca/lifetime.start. This situation arises relatively often for Rust code, because Rust does not initialize trailing structure padding and loves to insert redundant memcpys. This also fixes https://bugs.llvm.org/show_bug.cgi?id=39844. For the implementation, I'm reusing a bit of code for a similar existing optimization (direct memcpy of undef). I've also added memset support to MemDepAnalysis GetLocation -- Instead, getPointerDependencyFrom could be used, but it seems to make more sense to add this to GetLocation and thus make the computation cachable. Differential Revision: https://reviews.llvm.org/D55120 llvm-svn: 348645
* [MemCpyOpt] Add tests for memset->memcpy forwaring with undef tail; NFCNikita Popov2018-12-071-0/+152
| | | | | | These are baseline tests for D55120. llvm-svn: 348644
* AMDGPU: Use gfx9 instead of gfx8 in a testMatt Arsenault2018-12-071-135/+133
| | | | | | | | They are the same for the purposes of the tests, but it's much easier to write check lines for the memory instructions with offsets. llvm-svn: 348643
* [Preprocessor] Don't avoid entering included files after hitting a fatal error.Volodymyr Sapsai2018-12-075-5/+31
| | | | | | | | | | | | | | | | | | | | | | | Change in r337953 violated the contract for `CXTranslationUnit_KeepGoing`: > Do not stop processing when fatal errors are encountered. Use different approach to fix long processing times with multiple inclusion cycles. Instead of stopping preprocessing for fatal errors, do this after reaching the max allowed include depth and only for the files that were processed already. It is likely but not guaranteed those files cause a cycle. rdar://problem/46108547 Reviewers: erik.pilkington, arphaman Reviewed By: erik.pilkington Subscribers: jkorous, dexonsmith, ilya-biryukov, Dmitry.Kozhevnikov Differential Revision: https://reviews.llvm.org/D55095 llvm-svn: 348641
* [HotColdSplitting] Refine definition of unlikelyExecutedVedant Kumar2018-12-074-30/+148
| | | | | | | | | | | | | | | | | | | | | | | The splitting pass uses its 'unlikelyExecuted' predicate to statically decide which blocks are cold. - Do not treat noreturn calls as if they are cold unless they are actually marked cold. This is motivated by functions like exit() and longjmp(), which are not beneficial to outline. - Do not treat inline asm as an outlining barrier. In practice asm("") is frequently used to inhibit basic block merging; enabling outlining in this case results in substantial memory savings. - Treat invokes of cold functions as cold. As a drive-by, remove the 'exceptionHandlingFunctions' predicate, because it's no longer needed. The pass can identify & outline blocks dominated by EH pads, so there's no need to special-case __cxa_begin_catch etc. Differential Revision: https://reviews.llvm.org/D54244 llvm-svn: 348640
* [HotColdSplitting] Outline more than once per functionVedant Kumar2018-12-0711-165/+825
| | | | | | | | | | | | | | | | | | Algorithm: Identify maximal cold regions and put them in a worklist. If a candidate region overlaps with another, discard it. While the worklist is full, remove a single-entry sub-region from the worklist and attempt to outline it. By the non-overlap property, this should not invalidate parts of the domtree pertaining to other outlining regions. Testing: LNT results on X86 are clean. With test-suite + externals, llvm outlines 134KB pre-patch, and 352KB post-patch (+ ~2.6x). The file 483.xalancbmk/src/Constants.cpp stands out as an extreme case where llvm outlines over 100 times in some functions (mostly EH paths). There was not a significant performance impact pre vs. post-patch. Differential Revision: https://reviews.llvm.org/D53887 llvm-svn: 348639
* [analyzer] Move out tracking retain count for OSObjects into a separate checkerGeorge Karpenkov2018-12-077-88/+225
| | | | | | | | | Allow enabling and disabling tracking of ObjC/CF objects separately from tracking of OS objects. Differential Revision: https://reviews.llvm.org/D55400 llvm-svn: 348638
* [analyzer] RetainCountChecker: remove untested, unused, incorrect option ↵George Karpenkov2018-12-073-17/+7
| | | | | | | | | | | | IncludeAllocationLine The option has no tests, is not used anywhere, and is actually incorrect: it prints the line number without the reference to a file, which can be outright incorrect. Differential Revision: https://reviews.llvm.org/D55385 llvm-svn: 348637
* Missing freebsd files.David Carlier2018-12-072-0/+1159
| | | | | | | A lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc A lib/sanitizer_common/sanitizer_platform_limits_freebsd.h llvm-svn: 348635
* [Sanitizer] Separate FreeBSD interception data structuresDavid Carlier2018-12-079-160/+53
| | | | | | | | | | Reviewers: vitalybuka, krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D55386 llvm-svn: 348634
* [clang-tidy]: Abseil: new check 'abseil-upgrade-duration-conversions'Eric Fiselier2018-12-078-0/+726
| | | | | | | | | | | | | Patch by Alex Strelnikov. Reviewed as D53830 Introduce a new check to upgrade user code based on upcoming API breaking changes to absl::Duration. The check finds calls to arithmetic operators and factory functions for absl::Duration that rely on an implicit user defined conversion to int64_t. These cases will no longer compile after proposed changes are released. Suggested fixes explicitly cast the argument int64_t. llvm-svn: 348633
* Update the Swift version numbers reported by objdumpMichael Trent2018-12-071-2/+6
| | | | | | | | | | | | | | | | | | Summary: Add Swift 4.1, Swift 4.2, and Swift 5 version numbers to objdump's MachODump's print_imae_info routines. rdar://46548425 Reviewers: pete, lhames, bob.wilson Reviewed By: pete, bob.wilson Subscribers: bob.wilson, llvm-commits Differential Revision: https://reviews.llvm.org/D55442 llvm-svn: 348632
* [NativePDB] Reconstruct function declarations from debug info.Zachary Turner2018-12-0710-9/+206
| | | | | | | | | | | | Previously we would create an lldb::Function object for each function parsed, but we would not add these to the clang AST. This is a first step towards getting local variable support working, as we first need an AST decl so that when we create local variable entries, they have the proper DeclContext. Differential Revision: https://reviews.llvm.org/D55384 llvm-svn: 348631
* [llvm-tapi] Don't try to override SequenceTraits for std::stringSam Clegg2018-12-072-18/+4
| | | | | | | | | | | | | | | | For some reason this doesn't seem to work with LLVM_LINK_LLVM_DYLIB build. See https://logs.chromium.org/logs/chromium/bb/client.wasm.llvm/linux/37764/+/recipes/steps/LLVM_regression_tests/0/stdout What is more it seems that overriding these traits for core types (including std::string) is not supported/recommend by YAMLTraits.h. See line 1918 which has the assertion: "only use LLVM_YAML_IS_SEQUENCE_VECTOR for types you control" Differential Revision: https://reviews.llvm.org/D55381 llvm-svn: 348630
* Revert "Introduce ObjectFileBreakpad"Shafik Yaghmour2018-12-0717-502/+1
| | | | | | | | This reverts commit 5e056e624cc57bb22a4c29a70b522783c6242293. Reverting because this lldb cmake bot: http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/13712/ llvm-svn: 348629
* [test] Fix reproduce-blackslash.s test with NetBSD tarMichal Gorny2018-12-071-1/+1
| | | | | | | | | | Unlike GNU tar and libarchive bsdtar, NetBSD 'tar -t' output does not use C-style escapes and instead outputs paths literally. Fix the test to account both for escaped and literal backslash output. Differential Revision: https://reviews.llvm.org/D55441 llvm-svn: 348628
* [DAGCombiner] split trunc from extend in hoistLogicOpWithSameOpcodeHands; NFCSanjay Patel2018-12-071-33/+48
| | | | | | | This duplicates several shared checks, but we need to split this up to fix underlying bugs in smaller steps. llvm-svn: 348627
* [X86] Replace instregex with instrs list. NFCI. Simon Pilgrim2018-12-073-3/+3
| | | | llvm-svn: 348626
* AMDGPU: Allow f32 types for llvm.amdgcn.s.buffer.loadMatt Arsenault2018-12-074-19/+70
| | | | llvm-svn: 348625
* [llvm-mca][x86] Add RDSEED instruction resource tests for GLMSimon Pilgrim2018-12-071-0/+39
| | | | llvm-svn: 348624
* [llvm-mca][x86] Add missing AES instruction resource testsSimon Pilgrim2018-12-074-0/+292
| | | | | | Add missing non-VEX instructions llvm-svn: 348623
* [llvm-mca][x86] Add RDRAND/RDSEED instruction resource testsSimon Pilgrim2018-12-0713-0/+529
| | | | llvm-svn: 348622
* [CostModel][X86] Fix overcounting arithmetic cost in illegal types in ↵Craig Topper2018-12-0722-1369/+1053
| | | | | | | | | | | | | | getArithmeticReductionCost/getMinMaxReductionCost We were overcounting the number of arithmetic operations needed at each level before we reach a legal type. We were using the full vector type for that level, but we are going to split the input vector at that level in half. So the effective arithmetic operation cost at that level is half the width. So for example on 8i32 on an sse target. Were were calculating the cost of an 8i32 op which is likely 2 for basic integer. Then after the loop we count 2 more v4i32 ops. For a total arith cost of 4. But if you look at the assembly there would only be 3 arithmetic ops. There are still more bugs in this code that I'm going to work on next. The non pairwise code shouldn't count extract subvectors in the loop. There are no extracts, the types are split in registers. For pairwise we need to use 2 two src permute shuffles. Differential Revision: https://reviews.llvm.org/D55397 llvm-svn: 348621
* [X86] Initialize and Register X86CondBrFoldingPassCraig Topper2018-12-074-4/+38
| | | | | | | | | | To make X86CondBrFoldingPass can be run with --run-pass option, this can test one wrong assertion on analyzeCompare function for SUB32ri when its operand is not imm Patch by Jianping Chen Differential Revision: https://reviews.llvm.org/D55412 llvm-svn: 348620
* AMDGPU: Remove llvm.SI.tbuffer.storeMatt Arsenault2018-12-073-142/+0
| | | | llvm-svn: 348619
* Make testcase more robust for bots actually building in /varAdrian Prantl2018-12-071-15/+15
| | | | llvm-svn: 348618
* [X86] Improve pfm counter coverage for llvm-exegesisSimon Pilgrim2018-12-071-0/+83
| | | | | | | | | | | | | | This patch attempts to improve pfm perf counter coverage for all the x86 CPUs that libpfm4 supports. Intel/AMD CPU families tend to share names for cycle/uops counters so even if they don't have a scheduler model yet they can at least use the default values (checked against the libpfm4 source code). The remaining CPUs (where their port/pipe resource counters are known) I've tried to add to the existing model mappings. These are untested but don't represent a regression to current llvm-exegesis behaviour for these CPUs. Differential Revision: https://reviews.llvm.org/D55432 llvm-svn: 348617
* AMDGPU: Remove llvm.SI.buffer.load.dwordMatt Arsenault2018-12-075-121/+5
| | | | llvm-svn: 348616
* AMDGPU: Remove llvm.AMDGPU.killMatt Arsenault2018-12-0710-117/+61
| | | | | | This is the last of the old AMDGPU intrinsics. llvm-svn: 348615
* [CTU] test/Analysis/ctu-main.cpp Attempt to fix failing windows botGabor Marton2018-12-071-2/+2
| | | | llvm-svn: 348614
* Adding an AST dump test for statement expressions; NFC.Aaron Ballman2018-12-071-0/+11
| | | | llvm-svn: 348613
* Make testcase more robust for completely-out-of-tree builds.Adrian Prantl2018-12-071-5/+9
| | | | | | Thats to Dave Zarzycki for reprorting this! llvm-svn: 348612
* [libcxx] Add paranoid cast-to-void in comma operatorLouis Dionne2018-12-071-1/+1
| | | | llvm-svn: 348611
* [CTU] Add triple/lang mismatch handlingGabor Marton2018-12-076-1/+126
| | | | | | | | | | | | | | | | | | Summary: We introduce a strict policy for C++ CTU. It can work across TUs only if the C++ dialects are the same. We neither allow C vs C++ CTU. We do this because the same constructs might be represented with different properties in the corresponding AST nodes or even the nodes might be completely different (a struct will be RecordDecl in C, but it will be a CXXRectordDecl in C++, thus it may cause certain assertions during cast operations). Reviewers: xazax.hun, a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Differential Revision: https://reviews.llvm.org/D55134 llvm-svn: 348610
* [CTU] test/Analysis/ctu-main.cpp Attempt to fix failing windows botGabor Marton2018-12-071-2/+2
| | | | llvm-svn: 348609
* [test] Mark atime-based tests unsupported on NetBSDMichal Gorny2018-12-073-0/+6
| | | | | | | Mark tests requiring 'touch' to set atime unsupported on NetBSD due to kernel limitation preventing it from working with noatime. llvm-svn: 348607
* [OPENMP][NVPTX]Save registers for optimized builds with enabled logging.Alexey Bataev2018-12-071-18/+14
| | | | | | | | | | | | | | | | | Summary: Introduced special noinline function log that allows to save some registers for optimized builds but with enabled logging. Also, it increases the stability of the optimized builds with inlined runtime. Reviewers: gtbercea, kkwli0 Reviewed By: gtbercea Subscribers: caomhin, guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D55436 llvm-svn: 348606
* [CTU] Add more lit tests and better error handlingGabor Marton2018-12-076-2/+126
| | | | | | | | | | | | | | | Summary: Adding some more CTU list tests. E.g. to check if a construct is unsupported. We also slightly modify the handling of the return value of the `Import` function from ASTImporter. Reviewers: xazax.hun, balazske, a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Differential Revision: https://reviews.llvm.org/D55131 llvm-svn: 348605
* [DAGCombiner] disable truncation of binops by defaultSanjay Patel2018-12-0725-722/+867
| | | | | | | | | | As discussed in the post-commit thread of r347917, this transform is fighting with an existing transform causing an infinite loop or out-of-memory, so this is effectively reverting r347917 and its follow-up r348195 while we investigate the bug. llvm-svn: 348604
OpenPOWER on IntegriCloud