summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [TSan] Initialize libdispatch interceptors if necessaryJulian Lettner2019-03-082-0/+46
| | | | | | | | | | | | On Linux (and other non-Darwin platforms) we need to initialize interceptors. Since tsan_libdispatch.cc is compiled optionally, add a weak default implementation of `InitializeLibdispatchInterceptors`. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D59113 llvm-svn: 355717
* [DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a)Amaury Sechet2019-03-083-32/+37
| | | | | | | | | | | | | | Summary: This pattern is sometime created after legalization. Reviewers: efriedma, spatel, RKSimon, zvi, bkramer Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58874 llvm-svn: 355716
* [CFLAnders] Fix typo in comment; NFCGeorge Burgess IV2019-03-081-1/+1
| | | | | | | | Patch by Enna1! Differential Revision: https://reviews.llvm.org/D58756 llvm-svn: 355715
* [RegisterCoalescer] Limit the number of joins for large live interval withWei Mi2019-03-081-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | many valnos. Recently we found compile time out problem in several cases when SpeculativeLoadHardening was enabled. The significant compile time was spent in register coalescing pass, where register coalescer tried to join many other live intervals with some very large live intervals with many valnos. Specifically, every time JoinVals::mapValues is called, computeAssignment will be called by getNumValNums() times of the target live interval. If the large live interval has N valnos and has N copies associated with it, trying to coalescing those copies will at least cost N^2 complexity. The patch adds some limit to the effort trying to join those very large live intervals with others. By default, for live interval with > 100 valnos, and when it has been coalesced with other live interval by more than 100 times, we will stop coalescing for the live interval anymore. That put a compile time cap for the N^2 algorithm and effectively solves the compile time problem we saw. Differential revision: https://reviews.llvm.org/D59143 llvm-svn: 355714
* [x86] prevent infinite looping from inverse shuffle transformsSanjay Patel2019-03-082-1/+18
| | | | llvm-svn: 355713
* [X86] Add test case for PR22473Simon Pilgrim2019-03-081-0/+22
| | | | llvm-svn: 355712
* [Reproducers] Add missing LLDB_RECORD_DUMMY macrosJonas Devlieghere2019-03-0812-13/+111
| | | | | | | Re-ran lldb-inst on the API folder to insert missing LLDB_RECORD_DUMMY macros. llvm-svn: 355711
* [lldb-instr] Support LLDB_RECORD_DUMMYJonas Devlieghere2019-03-085-13/+34
| | | | | | | Extend lldb-instr to insert LLDB_RECORD_DUMMY macros for currently unsupported signatures (void and function pointers). llvm-svn: 355710
* [Reproducers] Add LLDB_RECORD_DUMMYJonas Devlieghere2019-03-082-3/+14
| | | | | | | | | | | | | Add a macro that doesn't actually record anything but still toggles the API boundary. Removing just the register macros for lldb::thread_t wasn't sufficient on NetBSD because the serialization logic needed the underlying type to be complete. This macro should be used by functions that are currently unsupported, as they might trip the API boundary logic. This should be easy using the lldb-instr tool. llvm-svn: 355709
* [lldb-vscode] Fix warningJonas Devlieghere2019-03-081-2/+2
| | | | | | | | I changed the variable to an unsigned to get rid of a signed and unsigned compare without realizing the value could be negative. This fixes the assert instead. llvm-svn: 355708
* [ARM][FIX] Fix vfmal.f16 and vfmsl.f16 operandDiogo N. Sampaio2019-03-083-10/+61
| | | | | | | | | | | | | | The indexed variant of vfmal.f16 and vfmsl.f16 instructions use the uppser bits of the indexed operand to store the index (1 bit for the double variant, 2 bits for the quad). This limits the usable registers to d0 - d7 or s0 - s15. This patch enforces this limitation. Differential Revision: https://reviews.llvm.org/D59021 llvm-svn: 355707
* Add more logging to TestQueues.pyFrederic Riss2019-03-081-2/+4
| | | | | | | | | The last round of logging taught us that when the test fails, lldb is indeed aware of the thread it's failing to associate to a given queue. Add more logging to try to figure out why the thread and the queue do not appear related to the Queue APIs. llvm-svn: 355706
* [analyzer] Fix infinite recursion in printing macrosKristof Umann2019-03-083-11/+186
| | | | | | | | | | | | | | | | | | | | In the commited testfile, macro expansion (the one implemented for the plist output) runs into an infinite recursion. The issue originates from the algorithm being faulty, as in #define value REC_MACRO_FUNC(value) the "value" is being (or at least attempted) expanded from the same macro. The solved this issue by gathering already visited macros in a set, which does resolve the crash, but will result in an incorrect macro expansion, that would preferably be fixed down the line. Patch by Tibor Brunner! Differential Revision: https://reviews.llvm.org/D57891 llvm-svn: 355705
* [analyzer] Emit an error rather than assert on invalid checker option inputKristof Umann2019-03-0814-32/+107
| | | | | | | | | | | Asserting on invalid input isn't very nice, hence the patch to emit an error instead. This is the first of many patches to overhaul the way we handle checker options. Differential Revision: https://reviews.llvm.org/D57850 llvm-svn: 355704
* [analyzer] Use the new infrastructure of expressing taint propagation, NFCKristof Umann2019-03-081-126/+58
| | | | | | | | | | | | | | | | | | | | | | In D55734, we implemented a far more general way of describing taint propagation rules for functions, like being able to specify an unlimited amount of source and destination parameters. Previously, we didn't have a particularly elegant way of expressing the propagation rules for functions that always return (either through an out-param or return value) a tainted value. In this patch, we model these functions similarly to other ones, by assigning them a TaintPropagationRule that describes that they "create a tainted value out of nothing". The socket C function is somewhat special, because for certain parameters (for example, if we supply localhost as parameter), none of the out-params should be tainted. For this, we added a general solution of being able to specify custom taint propagation rules through function pointers. Patch by Gábor Borsik! Differential Revision: https://reviews.llvm.org/D59055 llvm-svn: 355703
* [clang-tidy] NFC: Negate the name and semantics of the isNotInMacro function.Hyrum Wright2019-03-085-10/+9
| | | | | | | This function is always used in a context where its result was also negated, which made for confusing naming and code. llvm-svn: 355702
* Reland compiler-rt support for order file instrumentation.Manman Ren2019-03-0810-0/+172
| | | | | | | | | | | | | | r355343 was landed and was reverted in r355363 due to build breakage. This patch adds Linux/Windows support on top of r355343. In this patch, Darwin should be working with testing case. Linux should be working, I will enable the testing case in a follwup diff. Windows/Other should be building. Correct implementation for Other platforms will be added. Thanks David for reviewing the original diff, helping me with issues on Linux, and giving suggestions for adding support for Other platforms. llvm-svn: 355701
* Use {{.*}} in test case to match the type of wide string literals.Akira Hatanaka2019-03-081-1/+1
| | | | | | The type of wide string literals varies depending on the target. llvm-svn: 355700
* Fix typo in constant vectorSimon Pilgrim2019-03-081-3/+3
| | | | llvm-svn: 355699
* Re-fix _lrotl/_lrotr to always take Long, no matter the platform.Erich Keane2019-03-082-13/+12
| | | | | | | | r355322 fixed this, however is being reverted due to concerns with enabling it in other modes. Change-Id: I6a939b7469b8fa196d5871a627eb2330dbd30f29 llvm-svn: 355698
* Revert "Enable _rotl, _lrotl, _rotr, _lrotr on all platforms."Erich Keane2019-03-083-57/+15
| | | | | | This reverts commit 24400dafe16716f28cd0e7e5fa6e004c0e50686a. llvm-svn: 355697
* [llvm-readelf]Don't lose negative-ness of negative addends for no symbol ↵James Henderson2019-03-082-17/+95
| | | | | | | | | | | | | | | | | | | | relocations llvm-readelf prints relocation addends as: <symbol value>[+-]<absolute addend> where [+-] is determined from whether addend is less than zero or not. However, it does not print the +/- if there is no symbol, which meant that negative addends became their positive value with no indication that this had happened. This patch stops the absolute conversion when addends are negative and there is no associated symbol. Reviewed by: Higuoxing, mattd, MaskRay Differential Revision: https://reviews.llvm.org/D59095 llvm-svn: 355696
* gn build: Merge r355685Nico Weber2019-03-081-0/+1
| | | | llvm-svn: 355695
* gn build: Unbreak finding a working `gn` on $PATH on Unix after r355645Nico Weber2019-03-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | From the Python subprocess docs: If shell is True, it is recommended to pass args as a string rather than as a sequence. [...] If args is a sequence, the first item specifies the command string, and any additional items will be treated as additional arguments to the shell itself. Prior to this change, the `--version` would be passed to the shell, not to a potential gn binary on $PATH, and running `gn` without any arguments makes it exit with an exit code != 0, so the script would think that there wasn't a working gn binary on $PATH. Fix this by following the documentation's recommendation of using a string now that we pass shell=True. I tested this on macOS and Windows, each with the three cases of - no gn on PATH (should run gn downloaded by get.py if present, else suggest running get.py) - broken gn wrapper on PATH (should behave like the previous item) - working gn on PATH (should use gn on PATH) llvm-svn: 355694
* gn build: Unbreak get.py and gn.py on WindowsNico Weber2019-03-082-3/+5
| | | | | | | | | | | `os.uname()` doesn't exist on Windows, so use `platform.machine()` which returns `os.uname()[4]` on non-Win and (on 64-bit systems) "AMD64" on Windows. Also use `sys.platform` instead of `platform` to check for Windows-ness for the file extension in gn.py (get.py got this right). Differential Revision: https://reviews.llvm.org/D59115 llvm-svn: 355693
* [sanitizer] Update global_symbols.txtClement Courbet2019-03-081-0/+1
| | | | | | Add `bcmp` after r355672. llvm-svn: 355692
* [DAGCombine] Merge visitSMULO+visitUMULO into visitMULO. NFCI.Simon Pilgrim2019-03-081-17/+8
| | | | llvm-svn: 355690
* [DAGCombine] Merge visitSADDO+visitUADDO into visitADDO. NFCI.Simon Pilgrim2019-03-081-48/+24
| | | | llvm-svn: 355689
* [DAGCombine] Merge visitSSUBO+visitUSUBO into visitSUBO. NFCI.Simon Pilgrim2019-03-081-33/+8
| | | | llvm-svn: 355688
* [mips] Use libatomic instead of GCC intrinsics for 64bitPetar Jovanovic2019-03-081-10/+66
| | | | | | | | | | | | | | | | | The following GCC intrinsics are not available on MIPS32: __sync_fetch_and_add_8 __sync_fetch_and_and_8 __sync_fetch_and_or_8 __sync_val_compare_and_swap_8 Replace these with appropriate libatomic implementation. Patch by Miodrag Dinic. Differential Revision: https://reviews.llvm.org/D45691 llvm-svn: 355687
* [IR][ARM] Add function pointer alignment to datalayoutMichael Platings2019-03-0813-25/+286
| | | | | | | | | Use this feature to fix a bug on ARM where 4 byte alignment is incorrectly assumed. Differential Revision: https://reviews.llvm.org/D57335 llvm-svn: 355685
* Make function definition in header inlineBenjamin Kramer2019-03-081-9/+9
| | | | | | | Otherwise including this header from more than one place will break linking. llvm-svn: 355684
* [clang][Index] Fix msan failureKadir Cetinkaya2019-03-081-2/+7
| | | | llvm-svn: 355683
* clang-cl : Parse all /d2 optionsHans Wennborg2019-03-082-0/+2
| | | | | | | | | | | We will now warn about such options being unused, which is better than the current "no such file or directory: '/d2foo'" errors. Note that we can still handle specific flags separately, e.g. we were already ignoring /d2FastFail and /d2Zi+ llvm-svn: 355682
* [clangd] Remove ./ and ../ in the file pathsKadir Cetinkaya2019-03-082-0/+34
| | | | | | | | | | | | Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59084 llvm-svn: 355681
* [clangd] Redirect clangd page.Haojian Wu2019-03-081-0/+3
| | | | | | | | | | | | Reviewers: gribozavr Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59128 llvm-svn: 355680
* [clangd] Make sure constructors do not reference classKadir Cetinkaya2019-03-083-1/+19
| | | | | | | | | | | | Reviewers: gribozavr Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58815 llvm-svn: 355679
* [clang][Tooling] Delete dots and dotdots when generating absolute pathsKadir Cetinkaya2019-03-082-0/+6
| | | | | | | | | | | | | | | | Summary: GetAllFiles interface returns absolute paths, but keeps dots and dot dots. This patch makes those paths canonical by deleting them. Reviewers: hokein Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59079 llvm-svn: 355678
* [clangd] Deduplicate Refs on the fly.Haojian Wu2019-03-083-10/+11
| | | | | | | | | | | | | | | | | | | | Summary: Currently, we only do deduplication when we flush final results. We may have huge duplications (refs from headers) during the indexing period (running clangd-indexer on Chromium). With this change, clangd-indexer can index the whole chromium projects (48 threads, 40 GB peak memory usage). Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, mgrang, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59092 llvm-svn: 355676
* [SelectionDAG] Allow the user to specify a memeq function.Clement Courbet2019-03-089-28/+187
| | | | | | | | | | | | | | | | | | | | | | | Summary: Right now, when we encounter a string equality check, e.g. `if (memcmp(a, b, s) == 0)`, we try to expand to a comparison if `s` is a small compile-time constant, and fall back on calling `memcmp()` else. This is sub-optimal because memcmp has to compute much more than equality. This patch replaces `memcmp(a, b, s) == 0` by `bcmp(a, b, s) == 0` on platforms that support `bcmp`. `bcmp` can be made much more efficient than `memcmp` because equality compare is trivially parallel while lexicographic ordering has a chain dependency. Subscribers: fedor.sergeev, jyknight, ckennelly, gchatelet, llvm-commits Differential Revision: https://reviews.llvm.org/D56593 llvm-svn: 355672
* [AMDGPU] V_CVT_F32_UBYTE{0,1,2,3} are full rate instructionsCarl Ritson2019-03-083-9/+10
| | | | | | | | | | | | | | | | Summary: Fix a bug in the scheduling model where V_CVT_F32_UBYTE{0,1,2,3} are incorrectly marked as quarter rate instructions. Reviewers: arsenm, rampitec Reviewed By: rampitec Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59091 llvm-svn: 355671
* Add another test for r354937 that came up in PR40890Hans Wennborg2019-03-081-0/+2
| | | | llvm-svn: 355670
* [clangd] Adjust compile commands to be applicable for toolingKadir Cetinkaya2019-03-082-12/+53
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: As can be seen in https://github.com/llvm-mirror/clang/blob/master/lib/Tooling/Tooling.cpp#L385 clang tool invocations adjust commands normally like this. In clangd we have different code paths for invoking a frontend action(preamble builds, ast builds, background index, clangd-indexer) they all work on the same GlobalCompilationDatabase abstraction, but later on are subject to different modifications. This patch makes sure all of the clangd actions make use of the same compile commands before invocation. Enables background-index to work on chromium codebase(since they had dependency file output in their compile commands). Reviewers: gribozavr, hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59086 llvm-svn: 355669
* [clang][Index] Mark references from Constructors and Destructors to class as ↵Kadir Cetinkaya2019-03-086-12/+51
| | | | | | | | | | | | | | | | | | | | | | NameReference Summary: In current indexing logic we get references to class itself when we see a constructor/destructor which is only syntactically true. Semantically this information is not correct. This patch marks that reference as NameReference to let clients deal with it. Reviewers: akyrtzi, gribozavr, nathawes, benlangmuir Reviewed By: gribozavr, nathawes Subscribers: nathawes, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58814 llvm-svn: 355668
* [X86] Improve the type checking in isLegalMaskedLoad and isLegalMaskedGather.Craig Topper2019-03-082-11/+432
| | | | | | | | | | | | We were just checking pointer size and type primitive size. But this caused unintended things like vectors of half being accepted by masked load/store. For FP we now explicitly check for only double and float. For pointers we now let any pointer through. Trusting that only 32 and 64 would be used to generate assembly. We only check bitwidth after checking that the type is an integer. llvm-svn: 355667
* [Clang] Include the test directory ommited in r355665Petr Hosek2019-03-081-0/+0
| | | | | | This was omitted in r355655 causing the test to fail. llvm-svn: 355666
* [runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/Petr Hosek2019-03-0811-32/+51
| | | | | | | | | | | | | | | This change is a consequence of the discussion in "RFC: Place libs in Clang-dedicated directories", specifically the suggestion that libunwind, libc++abi and libc++ shouldn't be using Clang resource directory. Tools like clangd make this assumption, but this is currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build. This change addresses that by moving the output of these libraries to lib/<target> and include/ directories, leaving resource directory only for compiler-rt runtimes and Clang builtin headers. Differential Revision: https://reviews.llvm.org/D59013 llvm-svn: 355665
* Fix test case committed in r355662.Akira Hatanaka2019-03-081-1/+1
| | | | | | | Build bots were failing because wide string literals don't have type 'int *' on some targets. llvm-svn: 355664
* [Bitcode] Fix bitcode compatibility issue with clang.arc.use intrinsicSteven Wu2019-03-083-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In r349534, objc arc implementation is switched to use intrinsics and at the same time, clang.arc.use is renamed to llvm.objc.clang.arc.use to make the naming more consistent. The side-effect of that is llvm no longer recognize it as intrinsics and codegen external references to it instead. Rather than upgrade the old intrinsics name to the new one and wait for the arc-contract pass to remove it, simply remove it in the bitcode upgrader. rdar://problem/48607063 Reviewers: pete, ahatanak, erik.pilkington, dexonsmith Reviewed By: pete, dexonsmith Subscribers: jkorous, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59112 llvm-svn: 355663
* [ObjC] Emit a boxed expression as a compile-time constant if theAkira Hatanaka2019-03-0812-10/+113
| | | | | | | | | | | | | | | | | | expression inside the parentheses is a valid UTF-8 string literal. Previously clang emitted an expression like @("abc") as a message send to stringWithUTF8String. This commit makes clang emit the boxed expression as a compile-time constant instead. This commit also has the effect of silencing the nullable-to-nonnull conversion warning clang started emitting after r317727, which originally motivated this commit (see https://oleb.net/2018/@keypath). rdar://problem/42684601 Differential Revision: https://reviews.llvm.org/D58729 llvm-svn: 355662
OpenPOWER on IntegriCloud