1. Aug 15, 2018
    • Zachary Turner's avatar
      [MS Demangler] Fix some minor formatting bugs. · 2bbb23ba
      Zachary Turner authored
      1) We print __restrict twice on member pointers.  This is fixed
         and relevant tests are re-enabled.
      
      2) Several tests were disabled because of printing slightly
         different output than undname.  These were confirmed to be
         bugs in undname, so we just re-enable the tests.
      
      3) The test for printing reference temporaries is re-enabled.  This
         is a clang mangling extension, so we have some flexibility with
         how we demangle it.  The output currently looks fine, so we just
         re-enable the test with no fixes.
      
      llvm-svn: 339708
      2bbb23ba
    • Heejin Ahn's avatar
      [WebAssembly] SIMD extract_lane · a0fd9c3e
      Heejin Ahn authored
      Implement instruction selection for all versions of the extract_lane
      instruction. Use explicit sext/zext to differentiate between
      extract_lane_s and extract_lane_u for applicable types, otherwise
      default to extract_lane_u.
      
      Reviewers: aheejin
      
      Subscribers: sunfish, jgravelle-google, sbc100, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50597
      
      Patch by Thomas Lively (tlively)
      
      llvm-svn: 339707
      a0fd9c3e
    • Andrea Di Biagio's avatar
      [Tablegen][MCInstPredicate] Removed redundant template argument from class... · 9eaf5aa0
      Andrea Di Biagio authored
      [Tablegen][MCInstPredicate] Removed redundant template argument from class TIIPredicate, and implemented verification rules for TIIPredicates.
      
      This patch removes redundant template argument `TargetName` from TIIPredicate.
      Tablegen can always infer the target name from the context. So we don't need to
      force users of TIIPredicate to always specify it.
      
      This allows us to better modularize the tablegen class hierarchy for the
      so-called "function predicates". class FunctionPredicateBase has been added; it
      is currently used as a building block for TIIPredicates. However, I plan to
      reuse that class to model other function predicate classes too (i.e. not just
      TIIPredicates). For example, this can be a first step towards implementing
      proper support for dependency breaking instructions in tablegen.
      
      This patch also adds a verification step on TIIPredicates in tablegen.
      We cannot have multiple TIIPredicates with the same name. Otherwise, this will
      cause build errors later on, when tablegen'd .inc files are included by cpp
      files and then compiled.
      
      Differential Revision: https://reviews.llvm.org/D50708
      
      llvm-svn: 339706
      9eaf5aa0
    • Kostya Kortchinsky's avatar
      [scudo] Fix race condition in deallocation path when Quarantine is bypassed · 3afc797e
      Kostya Kortchinsky authored
      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
      3afc797e
    • Alexey Bataev's avatar
      [OPENMP] Fix processing of declare target construct. · 97b72212
      Alexey Bataev authored
      The attribute marked as inheritable since OpenMP 5.0 supports it +
      additional fixes to support new functionality.
      
      llvm-svn: 339704
      97b72212
    • Anna Thomas's avatar
      [LV] Teach about non header phis that have uses outside the loop · 60a1e4dd
      Anna Thomas authored
      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
      60a1e4dd
    • Louis Dionne's avatar
      [libc++] Fix incorrect definition of TEST_HAS_C11_FEATURES · 6513f375
      Louis Dionne authored
      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
      6513f375
    • Petr Hosek's avatar
      [CMake] Don't parse target triple except for arch · 39f08607
      Petr Hosek authored
      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
      39f08607
    • Bruno Cardoso Lopes's avatar
      Revert "[DebugInfo] Generate DWARF debug information for labels. (Fix leak problems)" · f446282a
      Bruno Cardoso Lopes authored
      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
      f446282a
    • Alina Sbirlea's avatar
      [GraphDiff] Make InverseGraph a property of a GraphDiff. · abf94118
      Alina Sbirlea authored
      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
      abf94118
    • Martin Storsjo's avatar
      [CMake] Fix the LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY option · 3d2e5432
      Martin Storsjo authored
      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
      3d2e5432
    • Simon Pilgrim's avatar
      [X86][SSE] Avoid duplicate shuffle input sources in combineX86ShufflesRecursively · 2ce3d6e1
      Simon Pilgrim authored
      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
      2ce3d6e1
    • Raphael Isemann's avatar
      Remove manual byte counting from Highlighter code. · 2d437f6b
      Raphael Isemann authored
      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
      2d437f6b
    • Alina Sbirlea's avatar
      [DomTree] Cleanup Update and LegalizeUpdate API moved to Support header. · 148c4454
      Alina Sbirlea authored
      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
      148c4454
    • Kevin P. Neal's avatar
      · 2c0bc8b7
      Kevin P. Neal authored
      We have in place support for parsing #pragma FENV_ACCESS, but that 
      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
      2c0bc8b7
    • David Bolvansky's avatar
      [NFC] Tests for select with binop fold - FP opcodes · ba74d1c4
      David Bolvansky authored
      llvm-svn: 339692
      ba74d1c4
    • Kevin P. Neal's avatar
      Revert test commit · da4c67f0
      Kevin P. Neal authored
      llvm-svn: 339691
      da4c67f0
    • Kevin P. Neal's avatar
      Test commit · 51f6e7ef
      Kevin P. Neal authored
      llvm-svn: 339690
      51f6e7ef
    • Alina Sbirlea's avatar
      Expose CFG Update struct. Define GraphTraits to get children given a snapshot CFG. · 4c44a447
      Alina Sbirlea authored
      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
      4c44a447
    • Nirav Dave's avatar
      [DAG] Avoid redundant chain transversal in store merge cycle check. NFCI. · fbfe2ad9
      Nirav Dave authored
      Patch by Henric Karlsson.
      
      llvm-svn: 339688
      fbfe2ad9
    • Kirill Bobyrev's avatar
      NFC: Enforce good formatting across multiple clang-tools-extra files · 8e35f1e7
      Kirill Bobyrev authored
      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
      8e35f1e7
    • Simon Pilgrim's avatar
      [X86][SSE] Add shuffle combine support for OR(PSHUFB,PSHUFB) style patterns. · ed551382
      Simon Pilgrim authored
      If each element is zero from one (or both) inputs then we can combine these into a single shuffle mask.
      
      llvm-svn: 339686
      ed551382
  2. Aug 14, 2018