Skip to content
  1. Dec 04, 2017
    • Jonas Devlieghere's avatar
      [NFC][lit] Use proper semantic versioning names for variables · 64774baf
      Jonas Devlieghere authored
      The variable named `minor` was actually pointing to the patch part of
      the version. While I was changing this I also made the check for Apple
      clang more robust by checking both patch and minor rather than just
      minor.
      
      llvm-svn: 319656
      64774baf
    • Sam McCall's avatar
      [clangd] Split CodeComplete into a separate file. NFC · 98775c50
      Sam McCall authored
      Summary: Shared details of ClangdUnit and CodeComplete moved to a new Compiler file.
      
      Reviewers: ilya-biryukov
      
      Subscribers: klimek, mgorny, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D40719
      
      llvm-svn: 319655
      98775c50
    • Oliver Stannard's avatar
      Revert r319649 - [Asm, ARM] Add fallback diag for multiple invalid operands · 7ab60605
      Oliver Stannard authored
      This is causing a failure in the llvm-clang-x86_64-expensive-checks-win
      buildbot, and I can't reproduce it locally, so reverting until I can work out
      what is wrong.
      
      llvm-svn: 319654
      7ab60605
    • Pavel Labath's avatar
      Makefile.rules: compile all tests with -fno-limit-debug-info · fd9a526a
      Pavel Labath authored
      Summary:
      This flag is on by default for darwin and freebsd, but off for linux.
      Without it, clang will sometimes not emit debug info for types like
      std::string. Whether it does this, and which tests will fail because of
      that depends on the linux distro and c++ library version.
      
      A bunch of tests were already setting these flags manually, but here
      instead I take a whole sale approach and enable this flag for all tests.
      Any test which does not want to have this flag (right now we have one
      such test) can turn it off explicitly via
      CFLAGS_EXTRAS+=$(LIMIT_DEBUG_INFO_FLAGS)
      
      This fixes a bunch of data formatter tests on red-hat.
      
      Reviewers: davide, jankratochvil
      
      Subscribers: emaste, aprantl, krytarowski, JDevlieghere, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D40717
      
      llvm-svn: 319653
      fd9a526a
    • Sam McCall's avatar
      Revert "[ValueTracking] Pass only a single lambda to... · d0d43e6f
      Sam McCall authored
      Revert "[ValueTracking] Pass only a single lambda to computeKnownBitsFromShiftOperator by using KnownBits struct instead of separate APInts. NFCI"
      
      This reverts commit r319624, which seems to cause a miscompile (breaks the
      multistage PPC buildbots)
      
      llvm-svn: 319652
      d0d43e6f
    • Tim Corringham's avatar
      AMDGPU: fix missing s_waitcnt · 6c6d5e24
      Tim Corringham authored
      Summary:
      The pass that inserts s_waitcnt instructions where needed propagated
      info used to track dependencies for each block by iterating over the
      predecessor blocks. The iteration was terminated when a predecessor
      that had not yet been processed was encountered. Any info in blocks
      later in the list was therefore not processed, leading to the
      possiblility of a required s_waitcnt not being inserted.
      
      The fix is simply to change the "break" to "continue" for the
      relevant loops, so that all visited blocks are processed. This
      is likely what was intended when the code was written.
      
      There is no test case provided for this fix because:
      1) the only example that reproduces this is large and resistant to
      being reduced
      2) the change is trivial
      
      Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye
      
      Differential Revision: https://reviews.llvm.org/D40544
      
      llvm-svn: 319651
      6c6d5e24
    • Kamil Rytarowski's avatar
      Move __tsan::Vector to __sanitizer · 64fc9cf2
      Kamil Rytarowski authored
      Summary:
      The low-fat STL-like vector container will be reused in MSan.
      
      It is needed to implement an atexit(3) interceptor on NetBSD/amd64 in MSan.
      
      Sponsored by <The NetBSD Foundation>
      
      Reviewers: joerg, dvyukov, eugenis, vitalybuka, kcc
      
      Reviewed By: dvyukov
      
      Subscribers: kubamracek, mgorny, llvm-commits, #sanitizers
      
      Tags: #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D40726
      
      llvm-svn: 319650
      64fc9cf2
    • Oliver Stannard's avatar
      [Asm, ARM] Add fallback diag for multiple invalid operands · 7cd4db94
      Oliver Stannard authored
      This adds a "invalid operands for instruction" diagnostic for
      instructions where there is an instruction encoding with the correct
      mnemonic and which is available for this target, but where multiple
      operands do not match those which were provided. This makes it clear
      that there is some combination of operands that is valid for the current
      target, which the default diagnostic of "invalid instruction" does not.
      
      Since this is a very general error, we only emit it if we don't have a
      more specific error.
      
      Differential revision: https://reviews.llvm.org/D36747
      
      llvm-svn: 319649
      7cd4db94
    • Peter Smith's avatar
      [ELF] Add BYTE expression to test case for non-contiguous relro [NFC] · 014be8ac
      Peter Smith authored
      As well as location counter expressions. The data generating expressions
      such as BYTE can generate a non-zero sized OutputSection that will report
      0 until assignAddresses() is called. Add an example to the existing test
      case relro-non-contiguous-script-data.s.
      
      Differential Revision: https://reviews.llvm.org/D40732
      
      llvm-svn: 319648
      014be8ac
    • Sam McCall's avatar
      [clangd] GlobalCompilationDatabase interface changes · ecbeab0e
      Sam McCall authored
      Summary:
      - GlobalCompilationDatabase now returns a single command (that's all we use)
      - fallback flags are now part of the GlobalCompilationDatabase.
        There's a default implementation that they can optionally customize.
      - this allows us to avoid invoking the fallback logic on two separate codepaths
      - race on extra flags fixed by locking the mutex
      - made GCD const-correct (DBGCD does have mutating methods)
      
      Reviewers: hokein
      
      Subscribers: klimek, cfe-commits, ilya-biryukov
      
      Differential Revision: https://reviews.llvm.org/D40733
      
      llvm-svn: 319647
      ecbeab0e
    • Jonas Paulsson's avatar
      [TwoAddressInstructionPass] Bugfix in handling of sunk instructions. · e86327f2
      Jonas Paulsson authored
      An instruction returned by TII->convertToThreeAddress() may contain a %noreg
      (undef) operand, which is not expected by tryInstructionTransform(). So if
      this MI is sunk to a lower point in MBB, it must be skipped when later
      encountered.
      
      A new set SunkInstrs is used for this purpose.
      
      Note: there is no test supplied here, as this was triggered on SystemZ while
      working on a review of instruction flags. A test case for this bugfix will be
      included in the upcoming SystemZ commit.
      
      Review: Quentin Colombet
      https://reviews.llvm.org/D40711
      
      llvm-svn: 319646
      e86327f2
    • Sam Parker's avatar
      [DAGCombine] Remove isAndLoadExtLoad arguments · 1e26d986
      Sam Parker authored
      Both LoadedVT and NarrowLoad are passed as references and neither
      of them are used by any of its callers.
      
      Differential Revision: https://reviews.llvm.org/D40713
      
      llvm-svn: 319645
      1e26d986
    • Martin Storsjö's avatar
      [AArch64] Allow using emulated tls on platforms other than ELF · eca862de
      Martin Storsjö authored
      This matches how it is done on X86.
      
      This allows using emulated tls on windows; in MinGW environments,
      native tls isn't supported at the moment.
      
      Set the right Data*bitsDirective for windows to match the existing
      tests for other platforms. Make parts of the existing tests a regex,
      to allow matching .section .rdata for windows, to avoid having to
      duplicate the rest of the tests for windows.
      
      Differential Revision: https://reviews.llvm.org/D40770
      
      llvm-svn: 319644
      eca862de
    • Martin Storsjö's avatar
      [ARM] Allow using emulated tls on platforms other than ELF · c85cc418
      Martin Storsjö authored
      This matches how it is done on X86.
      
      This allows using emulated tls on windows; in MinGW environments,
      native tls isn't supported at the moment.
      
      Differential Revision: https://reviews.llvm.org/D40769
      
      llvm-svn: 319643
      c85cc418
    • Manuel Klimek's avatar
      Fix bug where we wouldn't break columns over the limit. · 48c930cb
      Manuel Klimek authored
      Before, we would not break:
        int a = foo(/* trailing */);
      when the end of /* trailing */ was exactly the column limit; the reason
      is that block comments can have an unbreakable tail length - in this case
      2, for the trailing ");"; we would unconditionally account that when
      calculating the column state at the end of the token, but not correctly
      add it into the remaining column length before, as we do for string
      literals.
      The fix is to correctly account the trailing unbreakable sequence length
      into our formatting decisions for block comments. Line comments cannot
      have a trailing unbreakable sequence, so no change is needed for them.
      
      llvm-svn: 319642
      48c930cb
    • Craig Topper's avatar
      [X86] Allow VPMAXUQ/VPMAXSQ/VPMINUQ/VPMINSQ to be used with 128/256 bit... · 4520d4f8
      Craig Topper authored
      [X86] Allow VPMAXUQ/VPMAXSQ/VPMINUQ/VPMINSQ to be used with 128/256 bit vectors when AVX512 is enabled.
      
      These instructions can be used by widening to 512-bits and extracting back to 128/256. We do similar to several other instructions already.
      
      llvm-svn: 319641
      4520d4f8
    • Craig Topper's avatar
      [X86] Don't turn UINT_TO_FP into SINT_TO_FP during lowering. · 1151facf
      Craig Topper authored
      We already do this as a DAG combine. The version during lowering can only trigger if known bits changes something that improves known bits analysis. But this means we should be improving known bits analysis to work on the unlowered form instead.
      
      llvm-svn: 319640
      1151facf
    • Craig Topper's avatar
      [SelectionDAG] Teach computeKnownBits some improvements to ISD::SRL with a... · 67217d7e
      Craig Topper authored
      [SelectionDAG] Teach computeKnownBits some improvements to ISD::SRL with a non-splat constant shift amount.
      
      If we have a non-splat constant shift amount, the minimum shift amount can be used to infer the number of zero upper bits of the result. There's probably a lot more that we can do here, but this
      fixes a case where I wanted to infer the sign bit as zero when all the shift amounts are non-zero.
      
      llvm-svn: 319639
      67217d7e
    • Devin Coughlin's avatar
      [analyzer] Don't treat lambda-captures float constexprs as undefined · a565a7b9
      Devin Coughlin authored
      RegionStore has special logic to evaluate captured constexpr variables.
      However, if the constexpr initializer cannot be evaluated as an integer, the
      value is treated as undefined. This leads to false positives when, for example,
      a constexpr float is captured by a lambda.
      
      To fix this, treat a constexpr capture that cannot be evaluated as unknown
      rather than undefined.
      
      rdar://problem/35784662
      
      llvm-svn: 319638
      a565a7b9
  2. Dec 03, 2017
  3. Dec 02, 2017
    • Yaxun Liu's avatar
      CodeGen: Fix pointer info in SplitVecOp_EXTRACT_VECTOR_ELT/SplitVecRes_INSERT_VECTOR_ELT · 49477040
      Yaxun Liu authored
      Two issues found when doing codegen for splitting vector with non-zero alloca addr space:
      
      DAGTypeLegalizer::SplitVecRes_INSERT_VECTOR_ELT/SplitVecOp_EXTRACT_VECTOR_ELT uses dummy pointer info for creating
      SDStore. Since one pointer operand contains multiply and add, InferPointerInfo is unable to
      infer the correct pointer info, which ends up with a dummy pointer info for the target to lower
      store and results in isel failure. The fix is to introduce MachinePointerInfo::getUnknownStack to
      represent MachinePointerInfo which is known in alloca address space but without other information.
      
      TargetLowering::getVectorElementPointer uses value type of pointer in addr space 0 for
      multiplication of index and then add it to the pointer. However the pointer may be in an addr
      space which has different size than addr space 0. The fix is to use the pointer value type for
      index multiplication.
      
      Differential Revision: https://reviews.llvm.org/D39758
      
      llvm-svn: 319622
      49477040
    • Philipp Stephani's avatar
      Fix assume-filename handling in clang-format.el · c256a4ed
      Philipp Stephani authored
      Summary:
      When 'buffer-file-name' is nil 'call-process-region' returned a segmentation fault error.
      
      This was a problem when using clang-format-buffer on an orgmode source code editing buffer.
      
      I fixed this problem by excluding the '-assume-filename' argument when 'buffer-file-name' is nil.
      
      To make it a bit more flexible I also added an optional argument, 'assume-file-name', to specify an assume-filename that overrides 'buffer-file-name'.
      
      Reviewers: klimek, djasper, phst, phi
      
      Reviewed By: phst, phi
      
      Subscribers: phi, jholewinski, mgorny, javed.absar, eraman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D37903
      
      llvm-svn: 319621
      c256a4ed
    • Don Hinton's avatar
      [cmake] Re-commit: Remove redundant call to cmake when building host tools. · aa7d6db5
      Don Hinton authored
      Also pass CMAKE_(C|CXX)_COMPILER to add_custom_command.
      
      Summary:
      Remove the redundant, config-time call to cmake when
      building host tools for cross compiles or optimized tablegen..
      
      The config-time call to cmake is redundant because it will always get
      called again when the CONFIGURE_LLVM_${target_name} target fires at
      build-time.  This speeds up initial configuration, but has no affect
      on build behavior.
      
      Differential Revision: https://reviews.llvm.org/D40229
      
      llvm-svn: 319620
      aa7d6db5
    • Sanjay Patel's avatar
      [CodeGen] fix mapping from fmod calls to frem instruction · 08fba37e
      Sanjay Patel authored
      Similar to D40044 and discussed in D40594.
      
      llvm-svn: 319619
      08fba37e
    • Sanjay Patel's avatar
      [CodeGen] remove stale comment; NFC · 0c0f77d0
      Sanjay Patel authored
      The libm functions with LLVM intrinsic twins were moved above this blob with:
      https://reviews.llvm.org/rL319593
      
      llvm-svn: 319618
      0c0f77d0
    • Simon Atanasyan's avatar
      c8c5a6b2
    • Simon Atanasyan's avatar
      [llvm-readobj] Print static MIPS GOT · d4b693bf
      Simon Atanasyan authored
      If a linked binary file contains a dynamic section, the GOT layout
      defined by the dynamic section entries. In a statically linked file
      the GOT is just a series of entries. This change teaches `llvm-readobj`
      to print the GOT in that case. That provides a feature parity with GNU
      `readelf`.
      
      llvm-svn: 319616
      d4b693bf
Loading