1. Aug 23, 2018
  2. Aug 22, 2018
    • Simon Pilgrim's avatar
      [X86][SSE] LowerMULH vXi8 - use SSE shifts directly. · ffdfe456
      Simon Pilgrim authored
      We know these vXi16 extended cases are legal constant splat shifts.
      
      llvm-svn: 340414
      ffdfe456
    • Sid Manning's avatar
      [ELF][HEXAGON] Add R_HEX_16_X relocation · 564e65a4
      Sid Manning authored
      This relocation has only 6-bits the remaining are in the extender.
      
      Differential Revision: https://reviews.llvm.org/D50603
      
      llvm-svn: 340413
      564e65a4
    • Haojian Wu's avatar
      [clang-tidy] Add Abseil prefix to documentation · 3425cdc6
      Haojian Wu authored
      Summary: Adds the Abseil prefix to the list of prefixes in the documentation
      
      Patch by Deanna Garcia!
      
      Reviewers: aaron.ballman, hokein
      
      Reviewed By: hokein
      
      Subscribers: xazax.hun, cfe-commits
      
      Tags: #clang-tools-extra
      
      Differential Revision: https://reviews.llvm.org/D51100
      
      llvm-svn: 340412
      3425cdc6
    • Haojian Wu's avatar
      [clang-tidy] Abseil: faster strsplit delimiter check · 279d72d3
      Haojian Wu authored
      This check is an abseil specific check that checks for code using single character string literals as delimiters and transforms the code into characters.
      
      The check was developed internally and has been running at google, this is just
      a move to open source the check. It was originally written by @sbenza.
      
      Patch by Deanna Garcia!
      
      llvm-svn: 340411
      279d72d3
    • Ilya Biryukov's avatar
      [clangd] Get rid of regexes in CanonicalIncludes · 22abe49f
      Ilya Biryukov authored
      Summary: Replace them with suffix mappings.
      
      Reviewers: ioeric, kbobyrev
      
      Reviewed By: ioeric
      
      Subscribers: MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D51088
      
      llvm-svn: 340410
      22abe49f
    • Kirill Bobyrev's avatar
      [clangd] Implement BOOST iterator · 7413e985
      Kirill Bobyrev authored
      This patch introduces BOOST iterator - a substantial block for efficient
      and high-quality symbol retrieval. The concept of boosting allows
      performing computationally inexpensive scoring on the query side so that
      the final (expensive) scoring can only be applied on the items with the
      highest preliminary score while eliminating the need to score too many
      items.
      
      Reviewed by: ilya-biryukov
      
      Differential Revision: https://reviews.llvm.org/D50970
      
      llvm-svn: 340409
      7413e985
    • Akira Hatanaka's avatar
      [CodeGen] Look at the type of a block capture field rather than the type · 2a5e4639
      Akira Hatanaka authored
      of the captured variable when determining whether the capture needs
      special handing when the block is copied or disposed.
      
      This fixes bugs in the handling of variables captured by a block that is
      nested inside a lambda that captures the variables by reference.
      
      rdar://problem/43540889
      
      Differential Revision: https://reviews.llvm.org/D51025
      
      llvm-svn: 340408
      2a5e4639
    • Henry Wong's avatar
      [analyzer] Improve `CallDescription` to handle c++ method. · 2ca72e03
      Henry Wong authored
      Summary:
      `CallDecription` can only handle function for the time being. If we want to match c++ method, we can only use method name to match and can't improve the matching accuracy through the qualifiers. 
      
      This patch add the support for `QualifiedName` matching to improve the matching accuracy.
      
      Reviewers: xazax.hun, NoQ, george.karpenkov, rnkovacs
      
      Reviewed By: xazax.hun, NoQ, rnkovacs
      
      Subscribers: Szelethus, szepet, rnkovacs, a.sidorin, mikhail.ramalho, cfe-commits, MTC
      
      Differential Revision: https://reviews.llvm.org/D48027
      
      llvm-svn: 340407
      2ca72e03
    • Eric Fiselier's avatar
      Attempt to unbreak filesystem tests on certain linux distros. · 03533087
      Eric Fiselier authored
      On some platforms clock_gettime is in librt, which we don't
      link by default when building the tests. However it is required
      by the filesystem tests.
      
      This patch introduces a workaround which links librt whenever
      the filesystem tests are enabled. The workaround should later
      be replaced with a patch that selectively links both libc++fs
      and librt only when building filesystem specific tests. However,
      the way the test configuration is set up right now, this is
      non-trivial.
      
      llvm-svn: 340406
      03533087
    • Sam Parker's avatar
      [ARM] Rotated operand patterns for *xtb16 · 4d519fc3
      Sam Parker authored
      Add intrinsic isel patterns for sxtb16, sxtab16, uxtb16 and uxtab16
      so that they can perform a ror.
      
      Differential Revision: https://reviews.llvm.org/D51034
      
      llvm-svn: 340405
      4d519fc3
    • Ilya Biryukov's avatar
      [clangd] Make FileIndex aware of the main file · 8343baf6
      Ilya Biryukov authored
      Summary:
      It was previously only indexing the preamble decls. The new
      implementation will index both the preamble and the main AST and
      report both sets of symbols, preferring the ones from the main AST
      whenever the symbol is present in both.
      The symbols in the main AST slab always store all information
      available in the preamble symbols, possibly adding more,
      e.g. definition locations.
      
      Reviewers: hokein, ioeric
      
      Reviewed By: ioeric
      
      Subscribers: kadircet, MaskRay, jkorous, arphaman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D50889
      
      llvm-svn: 340404
      8343baf6
    • Haojian Wu's avatar
      [Preamble] Fix an undefined behavior when checking an empty preamble can be reused. · a3b34574
      Haojian Wu authored
      Summary: Passing nullptr to memcmp is UB.
      
      Reviewers: ilya-biryukov
      
      Reviewed By: ilya-biryukov
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D50967
      
      llvm-svn: 340403
      a3b34574
    • Gabor Marton's avatar
      Fix import of class templates partial specialization · 42e15deb
      Gabor Marton authored
      Summary:
      Currently there are several issues with the import of class template
      specializations.  (1) Different TUs may have class template specializations
      with the same template arguments, but with different set of instantiated
      MethodDecls and FieldDecls.  In this patch we provide a fix to merge these
      methods and fields.  (2) Currently, we search the partial template
      specializations in the set of simple specializations and we add partial
      specializations as simple specializations. This is bad, this patch fixes it.
      
      Reviewers: a_sidorin, xazax.hun, r.stahl
      
      Subscribers: rnkovacs, dkrupp, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D50451
      
      llvm-svn: 340402
      42e15deb
    • Ilya Biryukov's avatar
      [clangd] Add callbacks on parsed AST in addition to parsed preambles · c5e44c18
      Ilya Biryukov authored
      Summary:
      Will be used for updating the dynamic index on updates to the open files.
      Currently we collect only information coming from the preamble
      AST. This has a bunch of limitations:
        - Dynamic index misses important information from the body of the
          file, e.g. locations of definitions.
        - XRefs cannot be collected at all, since we can only obtain full
          information for the current file (preamble is parsed with skipped
          function bodies, therefore not reliable).
      
      This patch only adds the new callback, actually updates to the index
      will be done in a follow-up patch.
      
      Reviewers: hokein
      
      Reviewed By: hokein
      
      Subscribers: kadircet, javed.absar, ioeric, MaskRay, jkorous, arphaman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D50847
      
      llvm-svn: 340401
      c5e44c18
    • Martin Storsjo's avatar
      [COFF] Move a comment close to the code it refers to. NFC. · c0ee2403
      Martin Storsjo authored
      llvm-svn: 340400
      c0ee2403
    • Martin Storsjo's avatar
      [COFF] Change fatal() into error() when writing chunks to the output · 6c67e043
      Martin Storsjo authored
      In most of these cases, it's easy to go on despite the error,
      printing as many valuable error messages as possible from one run
      as possible.
      
      Differential Revision: https://reviews.llvm.org/D51087
      
      llvm-svn: 340399
      6c67e043
    • David Green's avatar
      [AArch64] Add Tiny Code Model for AArch64 · ecc69871
      David Green authored
      Adds a tiny code model to Clang along side rL340397.
      
      Differential Revision: https://reviews.llvm.org/D49674
      
      llvm-svn: 340398
      ecc69871
    • David Green's avatar
      [AArch64] Add Tiny Code Model for AArch64 · 9dd1d451
      David Green authored
      This adds the plumbing for the Tiny code model for the AArch64 backend. This,
      instead of loading addresses through the normal ADRP;ADD pair used in the Small
      model, uses a single ADR. The 21 bit range of an ADR means that the code and
      its statically defined symbols need to be within 1MB of each other.
      
      This makes it mostly interesting for embedded applications where we want to fit
      as much as we can in as small a space as possible.
      
      Differential Revision: https://reviews.llvm.org/D49673
      
      llvm-svn: 340397
      9dd1d451
    • Matt Arsenault's avatar
      AMDGPU: Fix not respecting byval alignment in call frame setup · bb8e64e7
      Matt Arsenault authored
      This was hackily adding in the 4-bytes reserved for the callee's
      emergency stack slot. Treat it like a normal stack allocation
      so we get the correct alignment padding behavior. This fixes
      an inconsistency between the caller and callee.
      
      llvm-svn: 340396
      bb8e64e7
    • Andrea Di Biagio's avatar
      [llvm-mca] Improved code comments and moved some method definitions from... · 4660fd25
      Andrea Di Biagio authored
      [llvm-mca] Improved code comments and moved some method definitions from Scheduler.h to Scheduler.cpp. NFC
      
      llvm-svn: 340395
      4660fd25
    • Simon Pilgrim's avatar
      Fix Wdocumentation warnings. NFCI. · 707f7619
      Simon Pilgrim authored
      llvm-svn: 340394
      707f7619
    • Simon Pilgrim's avatar
      [X86][SSE] Add sdiv test case from PR38658 · b89a4f85
      Simon Pilgrim authored
      llvm-svn: 340393
      b89a4f85
    • Stefan Maksimovic's avatar
      [mips] Handle missing CondCodes · 6ccbd164
      Stefan Maksimovic authored
      Add patterns for unhandled CondCode enumerables:
      SETEQ, SETGE, SETGT, SETLE, SETLT, SETNE.
      
      Stated at the ISD::CondCode enum declaration:
      `All of these (except for the 'always folded ops')
      should be handled for floating point.`
      
      Add patterns which use these nodes, same as corresponding
      'ordered' CondCode nodes.
      
      Referring to 'Ordered means that neither operand is a QNAN'
      we assume it is safe to match ex. SETLT node to the same
      instruction as SETOLT.
      
      Differential Revision: https://reviews.llvm.org/D50757
      
      llvm-svn: 340392
      6ccbd164
    • Stefan Maksimovic's avatar
      [clang][mips] Set __mips_fpr correctly for -mfpxx · eb632560
      Stefan Maksimovic authored
      Set __mips_fpr to 0 if o32 ABI is used with either -mfpxx
      or none of -mfp32, -mfpxx, -mfp64 being specified.
      
      Introduce additional checks:
      -mfpxx is only to be used in conjunction with the o32 ABI.
      report an error when incompatible options are provided.
      
      Formerly no errors were raised when combining n32/n64 ABIs
      with -mfp32 and -mfpxx.
      
      There are other cases when __mips_fpr should be set to 0
      that are not covered, ex. using o32 on a mips64 cpu
      which is valid but not supported in the backend as of yet.
      
      Differential Revision: https://reviews.llvm.org/D50557
      
      llvm-svn: 340391
      eb632560
    • Simon Tatham's avatar
      [clang-tblgen] Add -print-records and -dump-json modes. · b092da8c
      Simon Tatham authored
      Currently, if clang-tblgen is run without a mode option, it defaults
      to the first mode in its 'enum Action', which happens to be
      -gen-clang-attr-classes. I think it makes more sense for it to behave
      the same way as llvm-tblgen, i.e. print a diagnostic dump if it's not
      given any more specific instructions.
      
      I've also added the same -dump-json that llvm-tblgen supports. This
      means any tblgen command line (whether llvm- or clang-) can be
      mechanically turned into one that processes the same input into JSON.
      
      Reviewers: nhaehnle
      
      Reviewed By: nhaehnle
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D50771
      
      llvm-svn: 340390
      b092da8c
    • Dean Michael Berris's avatar
      [XRay] Refactor file header reading (NFC) · d764c1b6
      Dean Michael Berris authored
      Summary:
      This patch moves out the definition of the XRay log file header from
      binary logs into its own header and implementation file.
      
      This is one part of the refactoring being done in D50441.
      
      Reviewers: eizan
      
      Subscribers: mgorny, hiraditya, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D51086
      
      llvm-svn: 340389
      d764c1b6
    • Kirill Bobyrev's avatar
      [clangd] Cleanup after D50897 · 14e47004
      Kirill Bobyrev authored
      The wrong diff that was uploaded to Phabricator was building the wrong
      index.
      
      llvm-svn: 340388
      14e47004
    • Rui Ueyama's avatar
      Change how we handle -wrap. · 07b4536b
      Rui Ueyama authored
      We have an issue with -wrap that the option doesn't work well when
      renamed symbols get PLT entries. I'll explain what is the issue and
      how this patch solves it.
      
      For one -wrap option, we have three symbols: foo, wrap_foo and real_foo.
      Currently, we use memcpy to overwrite wrapped symbols so that they get
      the same contents. This works in most cases but doesn't when the relocation
      processor sets some flags in the symbol. memcpy'ed symbols are just
      aliases, so they always have to have the same contents, but the
      relocation processor breaks that assumption.
      
      r336609 is an attempt to fix the issue by memcpy'ing again after
      processing relocations, so that symbols that are out of sync get the
      same contents again. That works in most cases as well, but it breaks
      ASan build in a mysterious way.
      
      We could probably fix the issue by choosing symbol attributes that need
      to be copied after they are updated. But it feels too complicated to me.
      
      So, in this patch, I fixed it once and for all. With this patch, we no
      longer memcpy symbols. All references to renamed symbols point to new
      symbols after wrapSymbols() is done.
      
      Differential Revision: https://reviews.llvm.org/D50569
      
      llvm-svn: 340387
      07b4536b
    • Hiroshi Inoue's avatar
      [AST] correct the behavior of -fvisibility-inlines-hidden option (don't make... · 03ff37dd
      Hiroshi Inoue authored
      [AST] correct the behavior of -fvisibility-inlines-hidden option (don't make static local variables hidden)
      
      The command line option -fvisibility-inlines-hidden makes inlined method hidden, but it is expected not to affect the visibility of static local variables in the function.
      However, Clang makes the static local variables in the function also hidden as reported in PR37595. This problem causes LLVM bootstarp failure on Fedora 28 if configured with -DBUILD_SHARED_LIBS=ON.
      
      This patch makes the behavior of -fvisibility-inlines-hidden option to be consistent with that of gcc; the option does not change the visibility of the static local variables if the containing function does not associated with explicit visibility attribute and becomes hidden due to this option.
      
      Differential Revision: https://reviews.llvm.org/D50968
      
      llvm-svn: 340386
      03ff37dd
    • Marshall Clow's avatar
      Fix Bug 38644: multimap::clear() missing exception specifier. Add noexcept... · 934e9a39
      Marshall Clow authored
      Fix Bug 38644: multimap::clear() missing exception specifier. Add noexcept tests for all the containers that have clear().
      
      llvm-svn: 340385
      934e9a39
    • Philip Reames's avatar
      [AST] Fix a whitespace typo [NFC] · fdd73b50
      Philip Reames authored
      llvm-svn: 340384
      fdd73b50
    • Philip Reames's avatar
      [AST] Reorder code to reduce a future patch diff [NFC] · 5d90c14b
      Philip Reames authored
      llvm-svn: 340383
      5d90c14b