summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [DWARF] Use hasFileAtIndex to properly verify DWARF 5 after rL358732Fangrui Song2019-04-191-3/+5
| | | | llvm-svn: 358734
* Fix overly-long line after r358731.Richard Smith2019-04-191-2/+2
| | | | llvm-svn: 358733
* [llvm] Prevent duplicate files in debug line header in dwarf 5: another attemptAli Tamur2019-04-1914-52/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another attempt to land the changes in debug line header to prevent duplicate files in Dwarf 5. I rolled back my previous commit because of a mistake in generating the object file in a test. Meanwhile, I addressed some offline comments and changed the implementation; the largest difference is that MCDwarfLineTableHeader does not keep DwarfVersion but gets it as a parameter. I also merged the patch to fix two lld tests that will strt to fail into this patch. Original Commit: https://reviews.llvm.org/D59515 Original Message: Motivation: In previous dwarf versions, file name indexes started from 1, and the primary source file was not explicit. Dwarf 5 standard (6.2.4) prescribes the primary source file to be explicitly given an entry with an index number 0. The current implementation honors the specification by just duplicating the main source file, once with index number 0, and later maybe with another index number. While this is compliant with the letter of the standard, the duplication causes problems for consumers of this information such as lldb. (Some files are duplicated, where only some of them have a line table although all refer to the same file) With this change, dwarf 5 debug line section files always start from 0, and the zeroth entry is not duplicated whenever possible. This requires different handling of dwarf 4 and dwarf 5 during generation (e.g. when a function returns an index zero for a file name, it signals an error in dwarf 4, but not in dwarf 5) However, I think the minor complication is worth it, because it enables all consumers (lldb, gdb, dwarfdump, objdump, and so on) to treat all files in the file name list homogenously. llvm-svn: 358732
* Fix typo in function name [NFC]Ali Tamur2019-04-191-3/+3
| | | | llvm-svn: 358731
* [APInt] Optimize umul_ovFangrui Song2019-04-192-5/+48
| | | | | | | | | | | | | Change two costly udiv() calls to lshr(1)*RHS + left-shift + plus On one 64-bit umul_ov benchmark, I measured an obvious improvement: 12.8129s -> 3.6257s Note, there may be some value to special case 64-bit (the most common case) with __builtin_umulll_overflow(). Differential Revision: https://reviews.llvm.org/D60669 llvm-svn: 358730
* [analyzer] Fix -Wunused-local-typedef after rC358695Fangrui Song2019-04-191-5/+2
| | | | llvm-svn: 358729
* MergeFunc: preserve COMDAT information when creating a thunkSaleem Abdulrasool2019-04-192-0/+25
| | | | | | | | | | We would previously drop the COMDAT on the thunk we generated when replacing a function body with the forwarding thunk. This would result in a function that may have been multiply emitted and multiply merged to be emitted with the same name without the COMDAT. This is a hard error with PE/COFF where the COMDAT is used for the deduplication of Value Witness functions for Swift. llvm-svn: 358728
* [libFuzzer] revert part of r358726 committed by mistake (oops)Kostya Serebryany2019-04-191-1/+0
| | | | llvm-svn: 358727
* [libFuzzer] in fork mode, make sure the child stats are always collected. ↵Kostya Serebryany2019-04-192-2/+4
| | | | | | This should fix the flakiness in fork-ubsan.test llvm-svn: 358726
* [libc++] Make __debug_less::operator() constexprThomas Anderson2019-04-192-0/+14
| | | | | | | | | | | | | | This is a followup to [1] which added a new `__debug_less::operator()` overload. [2] added `_LIBCPP_CONSTEXPR_AFTER_CXX17` to the original `__debug_less::operator()` between the time of writing [1] and landing it. This change adds `_LIBCPP_CONSTEXPR_AFTER_CXX17` to the new overload too. [1] https://reviews.llvm.org/rL358423 [2] https://reviews.llvm.org/rL358252 Differential Revision: https://reviews.llvm.org/D60724 llvm-svn: 358725
* Add header guard to Reusables.h [NFC]Ali Tamur2019-04-191-0/+5
| | | | llvm-svn: 358724
* [LoopUnroll] Move list of params into a struct [NFCI].Alina Sbirlea2019-04-184-72/+85
| | | | | | | | | | | | | | Summary: Cleanup suggested in review of r358304. Reviewers: sanjoy, efriedma Subscribers: jlebar, zzheng, dmgreen, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60638 llvm-svn: 358723
* [analyzer] Make default bindings to variables actually work.Artem Dergachev2019-04-184-1/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default RegionStore bindings represent values that can be obtained by loading from anywhere within the region, not just the specific offset within the region that they are said to be bound to. For example, default-binding a character \0 to an int (eg., via memset()) means that the whole int is 0, not just that its lower byte is 0. Even though memset and bzero were modeled this way, it didn't work correctly when applied to simple variables. Eg., in int x; memset(x, 0, sizeof(x)); we did produce a default binding, but were unable to read it later, and 'x' was perceived as an uninitialized variable even after memset. At the same time, if we replace 'x' with a variable of a structure or array type, accessing fields or elements of such variable was working correctly, which was enough for most cases. So this was only a problem for variables of simple integer/enumeration/floating-point/pointer types. Fix loading default bindings from RegionStore for regions of simple variables. Add a unit test to document the API contract as well. Differential Revision: https://reviews.llvm.org/D60742 llvm-svn: 358722
* [Python] Simplify the code. NFCI.Davide Italiano2019-04-184-24/+8
| | | | llvm-svn: 358721
* [analyzer] NFC: Make reusable unittest mocks reusable.Artem Dergachev2019-04-182-52/+61
| | | | | | | | Put them in a header for other Analyzer unittests to include. Differential Revision: https://reviews.llvm.org/D60739 llvm-svn: 358720
* [analyzer] NFC: MoveChecker: Refactor tests to use -verify=prefix.Artem Dergachev2019-04-181-432/+209
| | | | | | | | This -verify=prefix feature is quite underrated. Differential Revision: https://reviews.llvm.org/D60732 llvm-svn: 358719
* [AArch64] add tests for mul-by-element; NFCSanjay Patel2019-04-181-0/+127
| | | | llvm-svn: 358718
* [crashlog] Strip trailing `\n` from check_output return.Davide Italiano2019-04-181-1/+1
| | | | | | | | Generally having spurious `\n` doesn't matter, but here the returning string is a command which is executed, so we want to strip it. Pointed out by Jason. llvm-svn: 358717
* Implement sys::fs::copy_file using the macOS copyfile(3) APIAdrian Prantl2019-04-182-0/+50
| | | | | | | | | | | | | | | | | | to support APFS clones. This patch adds a Darwin-specific implementation of llvm::sys::fs::copy_file() that uses the macOS copyfile(3) API to support APFS copy-on-write clones, which should be faster and much more space efficient. https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/ToolsandAPIs/ToolsandAPIs.html Differential Revision: https://reviews.llvm.org/D60802 This reapplies 358628 with an additional bugfix handling the case where the destination file already exists. (Caught by the clang testsuite). llvm-svn: 358716
* [GlobalISel][AArch64] Legalize/select G_(S/Z/ANY)_EXT for v8s8sJessica Paquette2019-04-184-2/+147
| | | | | | | | | | | | | | | This adds legalization for G_SEXT, G_ZEXT, and G_ANYEXT for v8s8s. We were falling back on G_ZEXT in arm64-vabs.ll before, preventing us from selecting the @llvm.aarch64.neon.sabd.v8i8 intrinsic. This adds legalizer support for those 3, which gives us selection via the importer. Update the relevant tests (legalize-ext.mir, select-int-ext.mir) and add a GISel line to arm64-vabs.ll. Differential Revision: https://reviews.llvm.org/D60881 llvm-svn: 358715
* [GlobalISel][AArch64] Legalize v8s8 loadsJessica Paquette2019-04-182-0/+26
| | | | | | | | Add legalizer support for loads of v8s8 and update legalize-load-store.mir. Differential Revision: https://reviews.llvm.org/D60877 llvm-svn: 358714
* [c++2a] Add semantic support for private module fragments.Richard Smith2019-04-1813-97/+326
| | | | llvm-svn: 358713
* [libc++] Link against libc++abi in the libc++abi testsLouis Dionne2019-04-181-1/+5
| | | | | | PR27405 llvm-svn: 358712
* [OpenMP][NFC] Fix requires target test.Gheorghe-Teodor Bercea2019-04-181-5/+5
| | | | | | | | | | | | | | | | Summary: Fix requires target test. Reviewers: ABataev Subscribers: guansong, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60886 llvm-svn: 358711
* [clang-format] Fix incorrect formatting of keyword macro definitionOwen Pan2019-04-182-1/+7
| | | | | | | | See PR39719 Differential Revision: https://reviews.llvm.org/D60853 llvm-svn: 358710
* [OpenMP] Add checks for requires and target directives.Gheorghe-Teodor Bercea2019-04-184-4/+66
| | | | | | | | | | | | | | | | Summary: The requires directive containing target related clauses must appear before any target region in the compilation unit. Reviewers: ABataev, AlexEichenberger, caomhin Reviewed By: ABataev Subscribers: guansong, jfb, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60875 llvm-svn: 358709
* llvm-undname: Fix two more asserts-on-invalid, found by oss-fuzzNico Weber2019-04-182-3/+14
| | | | llvm-svn: 358708
* llvm-undname: Fix two asserts-on-invalidNico Weber2019-04-182-3/+15
| | | | llvm-svn: 358707
* [builtins] Build x86_64 with GENERIC_TF_SOURCESYi Kong2019-04-181-0/+1
| | | | llvm-svn: 358706
* [LibTooling] Fix build breakage from commit 7b7ce6683ee.Yitzhak Mandelbaum2019-04-181-1/+2
| | | | | | | | On configurations with -Werror,-Wmissing-field-initializers, the commit does not compile. This commit fixes the offending line. Original Differential Revision: https://reviews.llvm.org/D60408 llvm-svn: 358705
* [GuardWidening] Wire up a NPM version of the LoopGuardWidening passPhilip Reames2019-04-184-0/+168
| | | | llvm-svn: 358704
* Summary:Jonathan Metzman2019-04-184-33/+125
| | | | | | | | | | | | | | | | | | | | | | Add close_fd_mask functionality to AFL driver. Summary: Add support for env var AFL_DRIVER_CLOSE_FD_MASK which behaves the same as libFuzzer's -close_fd_mask=1. Also add tests. Reviewers: kcc, vitalybuka, morehouse Reviewed By: morehouse Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D60334 llvm-svn: 358703
* [NFC] FMF propagation for GlobalIselMichael Berg2019-04-182-8/+8
| | | | llvm-svn: 358702
* [BlockExtractor] Extend the file format to support the grouping of basic blocksQuentin Colombet2019-04-182-28/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this patch, each basic block listed in the extrack-blocks-file would be extracted to a different function. This patch adds the support for comma separated list of basic blocks to form group. When the region formed by a group is not extractable, e.g., not single entry, all the blocks of that group are left untouched. Let us see this new format in action (comments are not part of the file format): ;; funcName bbName[,bbName...] foo bb1 ;; Extract bb1 in its own function foo bb2,bb3 ;; Extract bb2,bb3 in their own function bar bb1,bb4 ;; Extract bb1,bb4 in their own function bar bb2 ;; Extract bb2 in its own function Assuming all regions are extractable, this will create one function and thus one call per region. Differential Revision: https://reviews.llvm.org/D60746 llvm-svn: 358701
* [pstl] Add a serial backend for the PSTLLouis Dionne2019-04-184-17/+150
| | | | | | | | | | | | | | | Summary: The serial backend performs all tasks serially and does not require threads. It does not have any dependencies beyond normal C++, but it is not very efficient either. Reviewers: rodgert, MikeDvorskiy Subscribers: mgorny, jkorous, dexonsmith, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59791 llvm-svn: 358700
* [PowerPC] Add some PPC vec cost tests to prep for D60160 NFCRoland Froese2019-04-182-16/+172
| | | | llvm-svn: 358699
* [libc++] [test] Add missing required headers to midpoint.integer.pass.cppBilly Robert O'Neal III2019-04-181-0/+2
| | | | | | This change authored by Paolo Torres <t-pator@microsoft.com> llvm-svn: 358698
* [LibTooling] Extend Transformer to support multiple simultaneous changes.Yitzhak Mandelbaum2019-04-183-204/+296
| | | | | | | | | | | | | | | | Summary: This revision allows users to specify independent changes to multiple (related) sections of the input. Previously, only a single section of input could be selected for replacement. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60408 llvm-svn: 358697
* [CodeComplete] Remove obsolete isOutputBinary().Sam McCall2019-04-187-30/+10
| | | | | | | | | | | | | | | | Summary: It's never set to true. Its only effect would be to set stdout to binary mode. Hopefully we have better ways of doing this by now :-) Reviewers: hokein Subscribers: jkorous, arphaman, kadircet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60871 llvm-svn: 358696
* [analyzer][NFC] Prefer binary searches in CheckerRegistryKristof Umann2019-04-182-24/+34
| | | | | | Differential Revision: https://reviews.llvm.org/D59459 llvm-svn: 358695
* [analyzer][NFC] Clang-format CheckerRegistryKristof Umann2019-04-182-49/+43
| | | | | | Differential Revision: https://reviews.llvm.org/D59458 llvm-svn: 358694
* [Docs] Add LLDB botsJonas Devlieghere2019-04-182-0/+21
| | | | llvm-svn: 358693
* [X86] combineVectorTruncationWithPACKUS - remove split/concatenation of maskSimon Pilgrim2019-04-1813-2230/+1710
| | | | | | | | | | | | | | combineVectorTruncationWithPACKUS is currently splitting the upper bit bit masking into 128-bit subregs and then concatenating them back together. This was originally done to avoid regressions that caused existing subregs to be concatenated to the larger type just for the AND masking before being extracted again. This was fixed by @spatel (notably rL303997 and rL347356). This also lets SimplifyDemandedBits do some further improvements before it hits the recursive depth limit. My only annoyance with this is that we were broadcasting some xmm masks but we seem to have lost them by moving to ymm - but that's a known issue as the logic in lowerBuildVectorAsBroadcast isn't great. Differential Revision: https://reviews.llvm.org/D60375#inline-539623 llvm-svn: 358692
* [LibTooling] Add Stencil library for format-string style codegen.Yitzhak Mandelbaum2019-04-185-0/+585
| | | | | | | | | | | | | | | | | | | | | Summary: This file defines the *Stencil* abstraction: a code-generating object, parameterized by named references to (bound) AST nodes. Given a match result, a stencil can be evaluated to a string of source code. A stencil is similar in spirit to a format string: it is composed of a series of raw text strings, references to nodes (the parameters) and helper code-generation operations. See thread on cfe-dev list with subject "[RFC] Easier source-to-source transformations with clang tooling" for background. Reviewers: sbenza Reviewed By: sbenza Subscribers: ilya-biryukov, mgorny, jfb, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59371 llvm-svn: 358691
* [libc++] Make sure we re-export some missing libc++abi symbols from libc++Louis Dionne2019-04-186-25/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Ensure we re-export __cxa_throw_bad_array_new_length and __cxa_uncaught_exceptions from libc++, since they are now provided by libc++abi. Doing this allows us to stop linking explicitly against libc++abi in the libc++abi tests, since libc++ re-exports all the necessary symbols. However, there is one caveat to that. We don't want libc++ to re-export __cxa_uncaught_exception (the singular form), since it's only provided for backwards compatibility. Hence, for the single test where we check this backwards compatibility, we explicitly link against libc++abi. PR27405 PR22654 Reviewers: EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60424 llvm-svn: 358690
* [clang-format] Fix indent of trailing raw string param after newlineKrasimir Georgiev2019-04-183-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently clang-format uses ContinuationIndent to indent the contents of a raw string literal that is the last parameter of the function call. This is to achieve formatting similar to trailing: ``` f(1, 2, R"pb( x: y)pb"); ``` However this had the unfortunate consequence of producing format like this: ``` fffffff(1, 2, R"pb( a: b )pb"); ``` This patch makes clang-format consider indenting a trailing raw string param after a newline based off the start of the format delimiter, producing: ``` fffffff(1, 2, R"pb( a: b )pb"); ``` Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60558 llvm-svn: 358689
* [LoopPred] Fix a blatantly obvious bug in r358684Philip Reames2019-04-182-1/+65
| | | | | | The bug is that I didn't check whether the operand of the invariant_loads were themselves invariant. I don't know how this got missed in the patch and review. I even had an unreduced test case locally, and I remember handling this case, but I must have lost it in one of the rebases. Oops. llvm-svn: 358688
* [x86] add tests for improved insertelement to index 0 (PR41512); NFCSanjay Patel2019-04-181-0/+193
| | | | | | Patch proposal in D60852. llvm-svn: 358687
* [CMake] Emit LLDB.framework.dSYM to avoid potential name collision with ↵Stefan Granitz2019-04-181-0/+4
| | | | | | | | | | | | | | | | | | driver's lldb.dSYM Summary: Emit framework's dSYM bundle as LLDB.framework.dSYM instead of LLDB.dSYM, because the latter could conflict with the driver's lldb.dSYM when emitted in the same directory on case-insensitive file systems. Requires https://reviews.llvm.org/D60862 Reviewers: friss, beanz, bogner Subscribers: mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D60863 llvm-svn: 358686
* [CMake] Allow custom extensions for externalized debug infoStefan Granitz2019-04-181-5/+12
| | | | | | | | | | | | | | | | Summary: Extra flexibility for emitting debug info to external files (remains Darwin only for now). LLDB needs this functionality to emit a LLDB.framework.dSYM instead of LLDB.dSYM when building the framework, because the latter could conflict with the driver's lldb.dSYM when emitted in the same directory on case-insensitive file systems. Reviewers: friss, bogner, beanz Subscribers: mgorny, aprantl, llvm-commits, #lldb Tags: #llvm Differential Revision: https://reviews.llvm.org/D60862 llvm-svn: 358685
OpenPOWER on IntegriCloud