summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [scudo] Fix race condition in deallocation path when Quarantine is bypassedKostya Kortchinsky2018-08-142-5/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There is a race window in the deallocation path when the Quarantine is bypassed. Initially we would just erase the header of a chunk if we were not to use the Quarantine, as opposed to using a compare-exchange primitive, to make things faster. It turned out to be a poor decision, as 2 threads (or more) could simultaneously deallocate the same pointer, and if the checks were to done before the header got erased, this would result in the pointer being added twice (or more) to distinct thread caches, and eventually be reused. Winning the race is not trivial but can happen with enough control over the allocation primitives. The repro added attempts to trigger the bug, with a moderate success rate, but it should be enough to notice if the bug ever make its way back into the code. Since I am changing things in this file, there are 2 smaller changes tagging along, marking a variable `const`, and improving the Quarantine bypass test at runtime. Reviewers: alekseyshl, eugenis, kcc, vitalybuka Reviewed By: eugenis, vitalybuka Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D50655 llvm-svn: 339705
* [OPENMP] Fix processing of declare target construct.Alexey Bataev2018-08-147-72/+59
| | | | | | | The attribute marked as inheritable since OpenMP 5.0 supports it + additional fixes to support new functionality. llvm-svn: 339704
* [LV] Teach about non header phis that have uses outside the loopAnna Thomas2018-08-143-18/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch teaches the loop vectorizer to vectorize loops with non header phis that have have outside uses. This is because the iteration dependence distance for these phis can be widened upto VF (similar to how we do for induction/reduction) if they do not have a cyclic dependence with header phis. When identifying reduction/induction/first order recurrence header phis, we already identify if there are any cyclic dependencies that prevents vectorization. The vectorizer is taught to extract the last element from the vectorized phi and update the scalar loop exit block phi to contain this extracted element from the vector loop. This patch can be extended to vectorize loops where instructions other than phis have outside uses. Reviewers: Ayal, mkuper, mssimpso, efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D50579 llvm-svn: 339703
* [libc++] Fix incorrect definition of TEST_HAS_C11_FEATURESLouis Dionne2018-08-141-1/+1
| | | | | | | | | | | | | | Summary: The macro was not defined in C++11 mode when it should have been, at least according to how _LIBCPP_HAS_C11_FEATURES is defined. Reviewers: mclow.lists, EricWF, jfb, dexonsmith Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50719 llvm-svn: 339702
* [CMake] Don't parse target triple except for archPetr Hosek2018-08-142-12/+6
| | | | | | | | | | | | | | compiler-rt CMake build currently tries to parse the triple and then put it back together, but doing so inherently tricky, and doing so from CMake is just crazy and currently doesn't handle triples that have more than three components. Fortunatelly, the CMake really only needs the architecture part, which is typically the first component, to construct variants for other architectures. This means we can keep the rest of the triple as is and avoid the parsing altogether. Differential Revision: https://reviews.llvm.org/D50548 llvm-svn: 339701
* Revert "[DebugInfo] Generate DWARF debug information for labels. (Fix leak ↵Bruno Cardoso Lopes2018-08-1419-537/+149
| | | | | | | | | | | | problems)" This reverts commit cb8c5e417d55141f3f079a8a876e786f44308336 / r339676. This causing a test to fail in http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/48406/ LLVM :: DebugInfo/Generic/debug-label.ll llvm-svn: 339700
* [GraphDiff] Make InverseGraph a property of a GraphDiff.Alina Sbirlea2018-08-141-18/+17
| | | | | | | | | | | | | | | | | Summary: Treating a graph in reverse is a property of the GraphDiff and should instead be a template argument, just like IsPostDom is one for DomTrees. If it's just an argument to all methods, we could have mismatches between the constructor of the GraphDiff which may reverse the updates when filtering them, and the calls retrieving the filtered delete/insert updates. Also, since this will be used in IDF, where we're using a DomTree, this creates a cleaner interface for the GraphTraits to use the existing template argument of DomTreeBase. Separate patch from the one adding GraphDiff, so get a clear diff of what changed. Reviewers: timshen, kuhar Subscribers: sanjoy, llvm-commits, jlebar Differential Revision: https://reviews.llvm.org/D50687 llvm-svn: 339699
* [CMake] Fix the LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY optionMartin Storsjo2018-08-141-1/+1
| | | | | | | | | | | This option should be available if LIBCXX_ENABLE_SHARED is enabled, not LIBCXX_ENABLE_STATIC. This fixes a typo from SVN r337814. Differential Revision: https://reviews.llvm.org/D50691 llvm-svn: 339697
* [X86][SSE] Avoid duplicate shuffle input sources in ↵Simon Pilgrim2018-08-143-36/+36
| | | | | | | | | | combineX86ShufflesRecursively rL339686 added the case where a faux shuffle might have repeated shuffle inputs coming from either side of the OR(). This patch improves the insertion of the inputs into the source ops lists to account for this, as well as making it trivial to add support for shuffles with more than 2 inputs in the future. llvm-svn: 339696
* Remove manual byte counting from Highlighter code.Raphael Isemann2018-08-145-45/+25
| | | | | | | | | | | | | | | | | | | | Summary: This removes the manual byte counting mechanism from the syntax highlighting code. This is no longer necessary as the Stream class now has built-in support for automatically counting the bytes that were written to it so far. The advantage of automatic byte counting via Stream is that it is less error-prone than the manual version and we need to write less boilerplate code. Reviewers: labath Reviewed By: labath Subscribers: labath, lldb-commits Differential Revision: https://reviews.llvm.org/D50676 llvm-svn: 339695
* [DomTree] Cleanup Update and LegalizeUpdate API moved to Support header.Alina Sbirlea2018-08-145-117/+28
| | | | | | | | | | | | | | Summary: Clean-up following D50479. Make Update and LegalizeUpdate refer to the utilities in Support/CFGUpdate. Reviewers: kuhar Subscribers: sanjoy, jlebar, mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D50669 llvm-svn: 339694
* We have in place support for parsing #pragma FENV_ACCESS, but that Kevin P. Neal2018-08-149-7/+109
| | | | | | | | | | | | | information is then discarded with a warning to the user that we don't support it. This patch gets us one step closer by getting the info down into the AST in most cases. Reviewed by: rsmith Differential Revision: https://reviews.llvm.org/D49865 llvm-svn: 339693
* [NFC] Tests for select with binop fold - FP opcodesDavid Bolvansky2018-08-141-20/+17
| | | | llvm-svn: 339692
* Revert test commitKevin P. Neal2018-08-141-1/+0
| | | | llvm-svn: 339691
* Test commitKevin P. Neal2018-08-141-0/+1
| | | | llvm-svn: 339690
* Expose CFG Update struct. Define GraphTraits to get children given a ↵Alina Sbirlea2018-08-143-0/+427
| | | | | | | | | | | | | | | | | | | | | | | snapshot CFG. Summary: Certain passes or analysis need to view a CFG snapshot rather than the actual CFG. This patch provides GraphTraits to offer such a view. The patch defines GraphTraits for BasicBlock* and Inverse<BasicBlock*> to provide CFG successors and predecessors based on a list of CFG updates. An Update is defined as a triple {InsertOrDeleteKind, BlockStartOfEdge, BlockEndOfEdge}. A GraphDiff is defined as a list of Updates that has been preprocessed to treat the CFG as a graph rather than a multi-graph. As such, there can only exist a single Update given two nodes. All duplicates will be filtered and Insert/Delete edges that cancel out will be ignored. The methods GraphDiff exposes are: - Determine if an existing child needs to be ignored, i.e. an Update exists in the correct direction to assume the removal of that edge. - Return a list of new children to be considered, i.e. an Update exists in the correct direction for each child in the list to assume the insertion of that edge. Reviewers: timshen, kuhar, chandlerc Subscribers: sanjoy, jlebar, llvm-commits Differential Revision: https://reviews.llvm.org/D50479 llvm-svn: 339689
* [DAG] Avoid redundant chain transversal in store merge cycle check. NFCI.Nirav Dave2018-08-141-1/+2
| | | | | | Patch by Henric Karlsson. llvm-svn: 339688
* NFC: Enforce good formatting across multiple clang-tools-extra filesKirill Bobyrev2018-08-1436-78/+113
| | | | | | | | | | | This patch improves readability of multiple files in clang-tools-extra and enforces LLVM Coding Guidelines. Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50707 llvm-svn: 339687
* [X86][SSE] Add shuffle combine support for OR(PSHUFB,PSHUFB) style patterns.Simon Pilgrim2018-08-144-112/+112
| | | | | | If each element is zero from one (or both) inputs then we can combine these into a single shuffle mask. llvm-svn: 339686
* [clang-doc] Fix unused variableJulie Hockett2018-08-141-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D50709 llvm-svn: 339685
* [X86][SSE] Add shuffle combine tests for OR(PSHUFB,PSHUFB) style patterns.Simon Pilgrim2018-08-142-0/+166
| | | | | | We generate these shuffle patterns but we fail to combine them. llvm-svn: 339684
* [InstCombine] regenerate checks; NFCSanjay Patel2018-08-142-9/+12
| | | | llvm-svn: 339683
* [Inliner] add inliner stats to new pm version of inlinerFedor Sergeev2018-08-141-0/+3
| | | | | | Increment existing NumInlined and NumDeleted stats in InlinerPass::run. llvm-svn: 339682
* [InstCombine] regenerate checks; NFCSanjay Patel2018-08-142-121/+154
| | | | llvm-svn: 339681
* [LLD][ELF] - Eliminate dead code from OffsetGetter::get().George Rimar2018-08-142-1/+32
| | | | | | | | | We have a dead piece of code there which is impossible to trigger using regular objects I believe. Patch removes it and adds a test case showing how this condition can be triggered with use of a broken object and crash the linker. llvm-svn: 339680
* [X86][SSE] Generalize lowerVectorShuffleAsBlendOfPSHUFBs to work with any ↵Simon Pilgrim2018-08-141-30/+31
| | | | | | | | vXi8 type. We still only use this for v16i8, but this cleans up the code to support v32i8/v64i8 sometime in the future. llvm-svn: 339679
* [OpenCL] Add test for constant sampler argumentSven van Haastregt2018-08-141-0/+2
| | | | llvm-svn: 339678
* [ELF][HEXAGON] Add R_HEX_32 supportSid Manning2018-08-142-0/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D50657 llvm-svn: 339677
* [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems)Hsiangkai Wang2018-08-1419-149/+537
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two forms for label debug information in DWARF format. 1. Labels in a non-inlined function: DW_TAG_label DW_AT_name DW_AT_decl_file DW_AT_decl_line DW_AT_low_pc 2. Labels in an inlined function: DW_TAG_label DW_AT_abstract_origin DW_AT_low_pc We will collect label information from DBG_LABEL. Before every DBG_LABEL, we will generate a temporary symbol to denote the location of the label. The symbol could be used to get DW_AT_low_pc afterwards. So, we create a mapping between 'inlined label' and DBG_LABEL MachineInstr in DebugHandlerBase. The DBG_LABEL in the mapping is used to query the symbol before it. The AbstractLabels in DwarfCompileUnit is used to process labels in inlined functions. We also keep a mapping between scope and labels in DwarfFile to help to generate correct tree structure of DIEs. It also generates label debug information under global isel. Differential Revision: https://reviews.llvm.org/D45556 llvm-svn: 339676
* [libc++] Add missing #include in C11 features testsLouis Dionne2018-08-143-0/+7
| | | | | | | | | | | | | | | | | | Summary: These #includes are quite important, since otherwise any #if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) checks are always false, and so we don't actually test for C11 support in the standard library. Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50674 llvm-svn: 339675
* [GlobalISel][IRTranslator] Fix a bug in handling repeating struct types ↵Amara Emerson2018-08-143-0/+18
| | | | | | | | during argument lowering. Differential Revision: https://reviews.llvm.org/D49442 llvm-svn: 339674
* [clangd] NFC: Cleanup clangd help messageKirill Bobyrev2018-08-141-2/+2
| | | | | | | | | | Add missed space, fix a typo. Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50702 llvm-svn: 339673
* [LLD][ELF] - Remove UnresolvedPolicy::IgnoreAll and relative code. NFC.George Rimar2018-08-143-7/+1
| | | | | | | | The code involved was simply dead. `IgnoreAll` value is used in `maybeReportUndefined` only which is never called for -r. And at the same time `IgnoreAll` was set only for -r. llvm-svn: 339672
* Remove unused FastDemangle sourcesStefan Granitz2018-08-145-2427/+1
| | | | llvm-svn: 339671
* [TableGen] Pass string/vector types by const reference (PR37666). NFCISimon Pilgrim2018-08-141-5/+6
| | | | llvm-svn: 339670
* Fix: ConstString::GetConstCStringAndSetMangledCounterPart() should update ↵Stefan Granitz2018-08-142-18/+43
| | | | | | | | | | | | | | | | | | | | | | | | | the value if the key exists already Summary: This issue came up because it caused problems in our unit tests. The StringPool did connect counterparts only once and silently ignored the values passed in subsequent calls. The simplest solution for the unit tests would be silent overwrite. In practice, however, it seems useful to assert that we never overwrite a different mangled counterpart. If we ever have mangled counterparts for other languages than C++, this makes it more likely to notice collisions. I added an assertion that allows the following cases: * inserting a new value * overwriting the empty string * overwriting with an identical value I fixed the unit tests, which used "random" strings and thus produced collisions. It would be even better if there was a way to reset or isolate the StringPool, but that's a different story. Reviewers: jingham, friss, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D50536 llvm-svn: 339669
* [gnu-objc] Make selector order deterministic.David Chisnall2018-08-142-3/+23
| | | | | | | | | | | | | | | | | | | Summary: This probably fixes PR35277, though there may be other sources of nondeterminism (this was the only case of iterating over a DenseMap). It's difficult to provide a test case for this, because it shows up only on systems with ASLR enabled. Reviewers: rjmccall Reviewed By: rjmccall Subscribers: bmwiedemann, mgrang, cfe-commits Differential Revision: https://reviews.llvm.org/D50559 llvm-svn: 339668
* Add a stub mangling for ObjC selectors in the Microsoft ABI.David Chisnall2018-08-141-2/+8
| | | | | | | | | | | | | | This mangling is used only for outlined SEH finally blocks, which have internal linkage. This fixes the failure of CodeGenObjC/2007-04-03-ObjcEH.m on builds with expensive checks enabled, on Windows. This test should probably be specifying a triple: it currently picks up whatever the host environment is using. Unfortunately, I have no idea what it is trying to test, because it contains no comments and predates Clang having working Objective-C IR generation. llvm-svn: 339667
* Fix MSVC "compiler limit: blocks nested too deeply" error. NFCI.Simon Pilgrim2018-08-141-35/+19
| | | | | | MSVC only accepts if-else chains up to 127 blocks long. I've had to merge a number of intrinsic cases together to get back below this limit, resulting in some duplication of string matches; this shouldn't cause any notable increase in runtime (and even then only for old IR, nothing that clang currently emits). llvm-svn: 339666
* [clangd] Show non-instantiated decls in signatureHelpIlya Biryukov2018-08-142-1/+62
| | | | | | | | | | | | | | | | | | | | | | | Summary: To avoid producing very verbose output in substitutions involving typedefs, e.g. T -> std::vector<std::string>::iterator gets turned into an unreadable mess when printed out for libstdc++, result contains internal types (std::__Vector_iterator<...>) and expanded well-defined typedefs (std::basic_string<char>). Until we improve the presentation code in clang, going with non-instantiated decls looks like a better UX trade-off. Reviewers: hokein, ioeric, kadircet Reviewed By: hokein Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50645 llvm-svn: 339665
* [XRay][clang] Add more test cases of -fxray-modes= (NFC)Dean Michael Berris2018-08-141-0/+14
| | | | | | | | | | This confirms expectations for multiple values provided through the driver when selecting specific modes and the order of appearance of individual values for the `-fxray-modes=` flag. This change just adds more test cases to an existing test file. llvm-svn: 339662
* [X86] Constant folding of adds/subs intrinsicsTomasz Krupa2018-08-142-0/+449
| | | | | | | | | | | | | | Summary: This adds constant folding of signed add/sub with saturation intrinsics. Reviewers: craig.topper, spatel, RKSimon, chandlerc, efriedma Reviewed By: craig.topper Subscribers: rnk, llvm-commits Differential Revision: https://reviews.llvm.org/D50499 llvm-svn: 339659
* [analyzer] Made a buildbot happy.Kristof Umann2018-08-141-2/+4
| | | | llvm-svn: 339655
* [RISCV] Fix incorrect use of MCInstBuilderRoger Ferrer Ibanez2018-08-141-8/+6
| | | | | | | | | | | | | | | | | | This is a fix for r339314. MCInstBuilder uses the named parameter idiom and an 'operator MCInst&' to ease the creation of MCInsts. As the object of MCInstBuilder owns the MCInst is manipulating, the lifetime of the MCInst is bound to that of MCInstBuilder. In r339314 I bound a reference to the MCInst in an initializer. The temporary of MCInstBuilder (and also its MCInst) is destroyed at the end of the declaration leading to a dangling reference. Fix this by using MCInstBuilder inside an argument of a function call. Temporaries in function calls are destroyed in the enclosing full expression, so the the reference to MCInst is still valid when emitToStreamer executes. llvm-svn: 339654
* [analyzer][UninitializedObjectChecker] Void pointers are casted back to ↵Kristof Umann2018-08-142-8/+46
| | | | | | | | their dynamic type in note message Differential Revision: https://reviews.llvm.org/D49228 llvm-svn: 339653
* Test commit: fix punctuationChih-Mao Chen2018-08-141-1/+1
| | | | llvm-svn: 339652
* [X86] Lowering addus/subus intrinsics to native IRTomasz Krupa2018-08-145-52/+214
| | | | | | | | | | | | | | Summary: This is the patch that lowers x86 intrinsics to native IR in order to enable optimizations. Reviewers: craig.topper, spatel, RKSimon Reviewed By: craig.topper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46892 llvm-svn: 339651
* [X86] Lowering addus/subus intrinsics to native IRTomasz Krupa2018-08-1418-1326/+2921
| | | | | | | | | | | | | | | | | | | Summary: This revision improves previous version (rL330322) which has been reverted due to crashes. This is the patch that lowers x86 intrinsics to native IR in order to enable optimizations. The patch also includes folding of previously missing saturation patterns so that IR emits the same machine instructions as the intrinsics. Reviewers: craig.topper, spatel, RKSimon Reviewed By: craig.topper Subscribers: mike.dvoretsky, DavidKreitzer, sroland, llvm-commits Differential Revision: https://reviews.llvm.org/D46179 llvm-svn: 339650
* [PDB] Parse UDT symbols and pointers to members (combined patch)Aleksandr Urakov2018-08-1413-117/+926
| | | | | | | | | | | | | | | | | | | | | | Summary: In this patch I've tried to combine the best ideas from D49368 and D49410, so it implements following: - Completion of UDTs from a PDB with a filling of a layout info; - Pointers to members; - Fixes the bug relating to a virtual base offset reading from `vbtable`. The offset was treated as an unsigned, but it can be a negative sometimes. - Support of MSInheritance attribute Reviewers: asmith, zturner, rnk, labath, clayborg, lldb-commits Reviewed By: zturner Subscribers: aleksandr.urakov, stella.stamenova, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D49980 llvm-svn: 339649
* [ARM] ParallelDSP: add option to enable/disable the passSjoerd Meijer2018-08-141-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D50511 llvm-svn: 339645
OpenPOWER on IntegriCloud