1. Nov 16, 2018
    • Louis Dionne's avatar
      [libcxx] Mention restriction on inline namespaces in LIBCXX_ABI_NAMESPACE docs · 91c0a462
      Louis Dionne authored
      I also kept the original "vague" documentation that saying that users are
      responsible for not breaking us. This doesn't mean anything because there's
      no way they can actually enforce that unless we restrict ourselves to a
      specific naming scheme, but I left the documentation because it acts as a
      good warning and gives us more leeway.
      
      llvm-svn: 347052
      91c0a462
    • Sanjay Patel's avatar
      [x86] regenerate complete checks for test; NFC · 8da76a65
      Sanjay Patel authored
      llvm-svn: 347051
      8da76a65
    • Than McIntosh's avatar
      [IRVerifier] Allow StructRet in statepoint · 4a1c5da7
      Than McIntosh authored
      Summary:
      StructRet attribute is not allowed in vararg calls. The statepoint
      intrinsic is vararg, but the wrapped function may be not. Allow
      calls of statepoint with StructRet arg, as long as the wrapped
      function is not vararg.
      
      Reviewers: thanm, anna
      
      Reviewed By: anna
      
      Subscribers: anna, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D53602
      
      llvm-svn: 347050
      4a1c5da7
    • Simon Atanasyan's avatar
      [DWARF] Use PRIx64 instead of 'x' to format 64-bit values · 705fbd5d
      Simon Atanasyan authored
      This is a follow-up to r346715. Use PRIx64 to formatted print of 64-bit
      value in the `DWARFDebugLoclists::LocationList::dump` to escape problem
      on big-endian hosts.
      
      llvm-svn: 347049
      705fbd5d
    • Roman Lebedev's avatar
      [X86] X86DAGToDAGISel::matchBitExtract(): extract 'lshr' from `X` · 90c5b3f7
      Roman Lebedev authored
      Summary:
      As discussed in previous review, and noted in the FIXME, if `X` is actually an `lshr Y, Z` (logical!),
      we can fold the `Z` into 'control`, and let the `BEXTR` do this too.
      We could just insert those 8 bits of shift amount into control,
      but it is better to instead zero-extend them, and 'or' them in place.
      
      We can only do this for `lshr`, not `ashr`, because we do not know that the mask cover only the bits of `Y`,
      and not any of the sign-extended bits.
      
      The obvious question is, is this actually legal to do?
      I believe it is. Relevant quotes, from `Intel® 64 and IA-32 Architectures Software Developer’s Manual`, `BEXTR — Bit Field Extract`:
      * `Bit 7:0 of the second source operand specifies the starting bit position of bit extraction.`
      * `A START value exceeding the operand size will not extract any bits from the second source operand.`
      * `Only bit positions up to (OperandSize -1) of the first source operand are extracted.`
      * `All higher order bits in the destination operand (starting at bit position LENGTH) are zeroed.`
      * `The destination register is cleared if no bits are extracted.`
      
      FIXME: if we can do this, i wonder if we should prefer `BEXTR` over `BZHI` in such cases.
      
      Reviewers: RKSimon, craig.topper, spatel, andreadb
      
      Reviewed By: RKSimon, craig.topper, andreadb
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54095
      
      llvm-svn: 347048
      90c5b3f7
    • Henry Wong's avatar
      [lldb] NFC: Remove the extra ';' · 831be096
      Henry Wong authored
      Summary:
      Remove extra `;` to eliminate the following pedantic warning.
      
      ```
      warning: extra ';' [-Wpedantic]
      
      ```
      
      Reviewers: shafik
      
      Reviewed By: shafik
      
      Subscribers: abidh, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D54528
      
      llvm-svn: 347047
      831be096
    • Benjamin Kramer's avatar
      Remove BUILD file from google-benchmark · 9dfe32e4
      Benjamin Kramer authored
      This was removed in r336666, but accidentally re-added in r346984.
      
      llvm-svn: 347046
      9dfe32e4
    • Simon Pilgrim's avatar
      [TargetLowering] Cleanup more of the EXTEND demanded bits cases so that they match. NFCI. · 3c8baf4f
      Simon Pilgrim authored
      Use the same variable names etc.
      
      llvm-svn: 347045
      3c8baf4f
    • Haojian Wu's avatar
      [clangd] Truncate SymbolID to 8 bytes. · 22c9f7b2
      Haojian Wu authored
      Summary:
      This is our goal. It has a non-zero rick, but so far we haven't see any
      collision (externally and internally).
      
      Reviewers: sammccall
      
      Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54622
      
      llvm-svn: 347044
      22c9f7b2
    • Alex Bradbury's avatar
      [RISCV][NFC] Define and use the new CA instruction format · b4a64ced
      Alex Bradbury authored
      The RISC-V ISA manual was updated on 2018-11-07 (commit 00557c3) to define a 
      new compressed instruction format, RVC format CA (no actual instruction 
      encodings were changed). This patch updates the RISC-V backend to define the 
      new format, and to use it in the relevant instructions.
      
      Differential Revision: https://reviews.llvm.org/D54302
      Patch by Luís Marques.
      
      llvm-svn: 347043
      b4a64ced
    • Alex Bradbury's avatar
      [RISCV] Constant materialisation for RV64I · 2146e8fb
      Alex Bradbury authored
      This commit introduces support for materialising 64-bit constants for RV64I,
      making use of the RISCVMatInt::generateInstSeq helper in order to share logic
      for immediate materialisation with the MC layer (where it's used for the li
      pseudoinstruction).
      
      test/CodeGen/RISCV/imm.ll is updated to test RV64, and gains new 64-bit
      constant tests. It would be preferable if anyext constant returns were sign
      rather than zero extended (see PR39092). This patch simply adds an explicit
      signext to the returns in imm.ll.
      
      Further optimisations for constant materialisation are possible, most notably
      for mask-like values which can be generated my loading -1 and shifting right.
      A future patch will standardise on the C++ codepath for immediate selection on
      RV32 as well as RV64, and then add further such optimisations to
      RISCVMatInt::generateInstSeq in order to benefit both RV32 and RV64 for
      codegen and li expansion.
      
      Differential Revision: https://reviews.llvm.org/D52962
      
      llvm-svn: 347042
      2146e8fb
    • Anton Korobeynikov's avatar
      [MSP430] Add support for .refsym directive · 411773d2
      Anton Korobeynikov authored
      Introduces support for '.refsym' assembler directive.
      
      From GCC docs (for MSP430):
      '.refsym' - This directive instructs assembler to add an undefined reference
      to the symbol following the directive. No relocation is created for this symbol;
      it will exist purely for pulling in object files from archives.
      
      Patch by Kristina Bessonova!
      
      Differential Revision: https://reviews.llvm.org/D54618
      
      llvm-svn: 347041
      411773d2
    • Anton Korobeynikov's avatar
      [MSP430] Add more tests for ABI and calling convention · cad2b831
      Anton Korobeynikov authored
      Patch by Kristina Bessonova!
      
      Differential Revision: https://reviews.llvm.org/D54582
      
      llvm-svn: 347040
      cad2b831
    • Haojian Wu's avatar
      [clangd] Fix a compiler warning and test crashes caused in rL347038. · 1bf52c59
      Haojian Wu authored
      llvm-svn: 347039
      1bf52c59
    • Kadir Cetinkaya's avatar
      Introduce shard storage to auto-index. · 06553bfe
      Kadir Cetinkaya authored
      Reviewers: sammccall, ioeric
      
      Reviewed By: sammccall
      
      Subscribers: llvm-commits, mgorny, Eugene.Zelenko, ilya-biryukov, jkorous, arphaman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54269
      
      llvm-svn: 347038
      06553bfe
    • Sam Parker's avatar
      [DAGCombine] Fix non-deterministic debug output · ab99cfab
      Sam Parker authored
      PR37970 reported non-deterministic debug output, this was caused by
      iterating through a set and not a a vector.
      
      bugzilla: https://bugs.llvm.org/show_bug.cgi?id=37970
      
      Differential Revision: https://reviews.llvm.org/D54570
      
      llvm-svn: 347037
      ab99cfab
    • Sam McCall's avatar
      [clangd] Initial clang-tidy diagnostics support. · 98ae9751
      Sam McCall authored
      Summary:
      This runs checks over a restricted subset of the TU:
       - preprocessor callbacks just receive the truncated PP events that
         occur when a preamble is used.
       - ASTMatchers run only over the top-level decls in the main-file
      
      This patch just turns on one simple check (bugprone-sizeof-expression)
      with no configuration. Configuration is complex enough to warrant a separate patch
      
      This depends on a patch allowing traversal to be restricted to a scope.
      
      Reviewers: hokein
      
      Subscribers: srhines, mgorny, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54204
      
      llvm-svn: 347036
      98ae9751
    • George Rimar's avatar
      [clang] - Simplify tools::SplitDebugName. · 9982e3b9
      George Rimar authored
      This should be NFC change.
      
      SplitDebugName recently started to accept the `Output` that
      can be used to simplify the logic a bit, also it
      seems that code in SplitDebugName that uses
      OPT_fdebug_compilation_dir is simply dead.
      
      Differential revision: https://reviews.llvm.org/D54576
      
      llvm-svn: 347035
      9982e3b9
    • Craig Topper's avatar
      [LegalizeVectorTypes] Teach WidenVecRes_Convert to turn ANY_EXTEND into... · bac7d973
      Craig Topper authored
      [LegalizeVectorTypes] Teach WidenVecRes_Convert to turn ANY_EXTEND into ANY_EXTEND_VECTOR_INREG when the input and output types need to be widened to the same width.
      
      If we don't do it here, DAGCombine will just end up creating it from the scalar any_extend+build_vector so might as well save a step.
      
      llvm-svn: 347034
      bac7d973
    • Eugene Leviant's avatar
      [ThinLTO] Internalize readonly globals · bf46e741
      Eugene Leviant authored
      An attempt to recommit r346584 after failure on OSX build bot.
      Fixed cache key computation in ThinLTOCodeGenerator and added
      test case
      
      llvm-svn: 347033
      bf46e741
    • Craig Topper's avatar
      [X86] Add custom type legalization for v2i8/v4i8/v8i8 mul under -x86-experimental-vector-widening. · 079c37da
      Craig Topper authored
      By early promoting the multiply to use an i16 element type we can avoid op legalization emit a second multiply for the 8 upper elements of the v16i8 type we would otherwise get.
      
      llvm-svn: 347032
      079c37da
    • Craig Topper's avatar
      [X86] Add some test cases for vector multiplies on vectors shorter than 128... · dc957d49
      Craig Topper authored
      [X86] Add some test cases for vector multiplies on vectors shorter than 128 bits with -x86-experimental-vector-widening-legalization.
      
      llvm-svn: 347031
      dc957d49
    • Simon Atanasyan's avatar
      [ELF][MIPS] Use MIPS R6 `sigrie` as a trap instruction · 275a5b44
      Simon Atanasyan authored
      Current value using as a trap instruction (0xefefefef) is not a good choice
      for MIPS because it's a valid MIPS instruction `swc3 $15,-4113(ra)`. This
      patch replaces 0xefefefef by 0x04170001. For all MIPS ISA revisions before
      R6, this value is just invalid instruction. Starting from MIPS R6 it's
      a valid instruction `sigrie 1` which signals a Reserved Instruction exception.
      
      mips-traps.s test case is added to test trap encoding. Other test cases
      are modified to remove redundant checking.
      
      Differential revision: https://reviews.llvm.org/D54154
      
      llvm-svn: 347029
      275a5b44
    • Matt Arsenault's avatar
      AMDGPU: Fix analyzeBranch failing with pseudoterminators · eabb8dd0
      Matt Arsenault authored
      If a block had one of the _term instructions used for gluing
      exec modifying instructions to the end of the block,
      analyzeBranch would fail, preventing the verifier from catching
      a broken successor list.
      
      llvm-svn: 347027
      eabb8dd0
    • Petr Hosek's avatar
      [CMake] Support cross-compiling with Fuchsia toolchain build · d63e8462
      Petr Hosek authored
      When second stage is being cross-compiled for a different platform
      we need to build enough of first stage runtimes to get a working
      compiler.
      
      Differential Revision: https://reviews.llvm.org/D54463
      
      llvm-svn: 347026
      d63e8462
    • Petr Hosek's avatar
      [CMake] Support cross-compiling with multi-stage builds · f8e27b38
      Petr Hosek authored
      When using multi-stage builds, we would like support cross-compilation.
      Example is 2-stage build when the first stage is compiled for host while
      the second stage is compiled for the target.
      
      Normally, the second stage would be also used for compiling runtimes,
      but that's not possible when cross-compiling, so we use the first stage
      compiler instead. However, we still want to use the second stage paths.
      To do so, we set the -resource-dir of the first stage compiler to point
      to the resource directory of the second stage.
      
      We also need compiler tools that support the target architecture. These
      tools are not guaranteed to be present on the host, but in case of
      multi-stage build, we can build these tools in the first stage.
      
      Differential Revision: https://reviews.llvm.org/D54461
      
      llvm-svn: 347025
      f8e27b38
    • Petr Hosek's avatar
      [compiler-rt] Use exact spelling when building for default target · 5f5c7737
      Petr Hosek authored
      When building for default target only, use exact target spelling
      when deriving the name for the per-target runtime directory. This
      is necessary for AArch32 where the CMake build by default rewrites
      the architecture which leads to unexpected results.
      
      Differential Revision: https://reviews.llvm.org/D54612
      
      llvm-svn: 347022
      5f5c7737
    • Petr Hosek's avatar
      [CMake] Use the correct spelling for armv7 in Fuchsia's toolchain · 1ee2987a
      Petr Hosek authored
      We need to explicitly specify the architecture version.
      
      Differential Revision: https://reviews.llvm.org/D54613
      
      llvm-svn: 347021
      1ee2987a
    • Zachary Turner's avatar
      Don't use uniform initialization syntax. · 9fbf9350
      Zachary Turner authored
      llvm-svn: 347020
      9fbf9350
    • Zi Xuan Wu's avatar
      [Clang][Sema]Choose a better candidate in overload function call if there is a... · 64d85a29
      Zi Xuan Wu authored
      [Clang][Sema]Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error
      
      There are 2 function variations with vector type parameter. When we call them with argument of different vector type we would prefer to 
      choose the variation with implicit argument conversion of compatible vector type instead of incompatible vector type. For example,
      
      typedef float __v4sf __attribute__((__vector_size__(16)));
      void f(vector float);
      void f(vector signed int);
      
      int main {
         __v4sf a;
         f(a);
      }
      
      Here, we'd like to choose f(vector float) but not report an ambiguous call error.
      
      Differential revision: https://reviews.llvm.org/D53417
      
      llvm-svn: 347019
      64d85a29
    • Zachary Turner's avatar
      [NativePDB] Rewrite the PdbSymUid to use our own custom namespacing scheme. · 6284aee9
      Zachary Turner authored
      Originally we created our 64-bit UID scheme by using the first byte as
      sort of a "tag" to represent what kind of symbol this was, and we
      re-used the PDB_SymType enumeration for this.  For native pdb support,
      this is not really the right abstraction layer, because what we really
      want is something that tells us *how* to find the symbol.  This means,
      specifically, is in the globals stream / public stream / module stream /
      TPI stream / etc, and for whichever one it is in, where is it within
      that stream?
      
      A good example of why the old namespacing scheme was insufficient is
      that it is more or less impossible to create a uid for a field list
      member of a class/struction/union/enum that tells you how to locate
      the original record.
      
      With this new scheme, the first byte is no longer a PDB_SymType enum
      but a new enum created specifically to identify where in the PDB
      this record lives.  This gives us much better flexibility in
      what kinds of symbols the uids can identify.
      
      llvm-svn: 347018
      6284aee9
    • Volodymyr Sapsai's avatar
      [VFS] Update unittest to fix Windows buildbot. · ab73426c
      Volodymyr Sapsai authored
      Buildbot http://lab.llvm.org:8011/builders/clang-x64-windows-msvc is failing
      because it doesn't like paths in VFS, make them more Windows-friendly.
      
      Follow up to r347009.
      
      llvm-svn: 347016
      ab73426c
    • Craig Topper's avatar
      Revert r347014 "[X86] Add some test cases for vector multiplies on vectors... · c93ae2b0
      Craig Topper authored
      Revert r347014 "[X86] Add some test cases for vector multiplies on vectors shorter than 128 bits with -x86-experimental-vector-widening-legalization."
      
      Apparently I failed to update this after turnign sign extend to any extend.
      
      llvm-svn: 347015
      c93ae2b0
    • Craig Topper's avatar
      [X86] Add some test cases for vector multiplies on vectors shorter than 128... · 36920b44
      Craig Topper authored
      [X86] Add some test cases for vector multiplies on vectors shorter than 128 bits with -x86-experimental-vector-widening-legalization.
      
      llvm-svn: 347014
      36920b44
    • Artem Belevich's avatar
      Added missing whitespace in the link. · d9e21fff
      Artem Belevich authored
      llvm-svn: 347013
      d9e21fff
    • Volodymyr Sapsai's avatar
      [VFS] Implement `RedirectingFileSystem::getRealPath`. · 7c5c3b1e
      Volodymyr Sapsai authored
      It fixes the case when Objective-C framework is added as a subframework
      through a symlink. When parent framework infers a module map and fails
      to detect a symlink, it would add a subframework as a submodule. And
      when we parse module map for the subframework, we would encounter an
      error like
      
      > error: umbrella for module 'WithSubframework.Foo' already covers this directory
      
      By implementing `getRealPath` "an egregious but useful hack" in
      `ModuleMap::inferFrameworkModule` works as expected.
      
      LLVM commit is r347009.
      
      rdar://problem/45821279
      
      Reviewers: bruno, benlangmuir, erik.pilkington
      
      Reviewed By: bruno
      
      Subscribers: hiraditya, dexonsmith, JDevlieghere, cfe-commits, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54245
      
      llvm-svn: 347012
      7c5c3b1e
    • Craig Topper's avatar
      [X86] Use ANY_EXTEND instead of SIGN_EXTEND in the AVX2 and later path for... · 5802b82b
      Craig Topper authored
      [X86] Use ANY_EXTEND instead of SIGN_EXTEND in the AVX2 and later path for legalizing vXi8 multiply.
      
      We aren't going to use the upper bits of the multiply result that the extend would effect. So we don't need a specific type of extend.
      
      This makes some reduction test cases shorter because we were previously trying to sign_extend a truncate which we can't eliminate.
      
      llvm-svn: 347011
      5802b82b
    • Craig Topper's avatar
    • Volodymyr Sapsai's avatar
      [VFS] Implement `RedirectingFileSystem::getRealPath`. · 7610033f
      Volodymyr Sapsai authored
      It fixes the case when Objective-C framework is added as a subframework
      through a symlink. When parent framework infers a module map and fails
      to detect a symlink, it would add a subframework as a submodule. And
      when we parse module map for the subframework, we would encounter an
      error like
      
      > error: umbrella for module 'WithSubframework.Foo' already covers this directory
      
      By implementing `getRealPath` "an egregious but useful hack" in
      `ModuleMap::inferFrameworkModule` works as expected.
      
      rdar://problem/45821279
      
      Reviewers: bruno, benlangmuir, erik.pilkington
      
      Reviewed By: bruno
      
      Subscribers: hiraditya, dexonsmith, JDevlieghere, cfe-commits, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54245
      
      llvm-svn: 347009
      7610033f
    • Ron Lieberman's avatar
      [AMDGPU] Add FixupVectorISel pass, currently Supports SREGs in GLOBAL LD/ST · cac749ac
      Ron Lieberman authored
      Add a pass to fixup various vector ISel issues.
      Currently we handle converting GLOBAL_{LOAD|STORE}_*
      and GLOBAL_Atomic_* instructions into their _SADDR variants.
      This involves feeding the sreg into the saddr field of the new instruction.
      
      llvm-svn: 347008
      cac749ac