1. Dec 07, 2018
    • Adrian Prantl's avatar
      Reapply "Adapt gcov to changes in CFE." · fbeeac0e
      Adrian Prantl authored
      This reverts commit r348203 and reapplies D55085 with an additional
      GCOV bugfix to make the change NFC for relative file paths in .gcno files.
      
      Thanks to Ilya Biryukov for additional testing!
      
      Original commit message:
      
          Update Diagnostic handling for changes in CFE.
      
          The clang frontend no longer emits the current working directory for
          DIFiles containing an absolute path in the filename: and will move the
          common prefix between current working directory and the file into the
          directory: component.
      
          https://reviews.llvm.org/D55085
      
      llvm-svn: 348512
      fbeeac0e
    • Zachary Turner's avatar
      [build.py] Embed the output file name in generated object file names. · df0c7ec0
      Zachary Turner authored
      In compile-and-link mode, the user doesn't specify the name of the
      object files to generate, because there could be multiple inputs
      on a single command line and this would be hard to specify.  So the
      script just tries to be smart and figure out the best object file
      names.  However, if two build scripts are running in parallel and
      using the same source files as input, they would previously race
      to write the same object files, since the computed name only considered
      the source file names when computing the object file names.
      
      With this patch, we also consider the final executable name.  In a
      way, this "namespaces" the generated object files so that as long
      as the final executable file names don't clash, the intermediate
      object file names won't clash either.
      
      llvm-svn: 348511
      df0c7ec0
    • Evandro Menezes's avatar
      [AArch64] Fix Exynos predicate · 799b76ea
      Evandro Menezes authored
      Fix predicate for arithmetic instructions with shift and/or extend.
      
      llvm-svn: 348510
      799b76ea
    • Louis Dionne's avatar
      [libcxx] Add checks for unique value of array<T, 0>.begin() and array<T, 0>.end() · 7125b08d
      Louis Dionne authored
      The standard section [array.zero] requires the return value of begin()
      and end() methods of a zero-sized array to be unique. Eric Fiselier
      clarifies: "That unique value cannot be null, and must be properly aligned".
      This patch adds checks for the first part of this clarification: unique
      value returned by these methods cannot be null.
      
      Reviewed as https://reviews.llvm.org/D55366.
      Thanks to Andrey Maksimov for the patch.
      
      llvm-svn: 348509
      7125b08d
    • Sanjay Patel's avatar
      [DAGCombiner] don't hoist logic op if operands have other uses · c3717cd0
      Sanjay Patel authored
      The AVX512 diffs are neutral, but the bswap test shows a clear overreach in 
      hoistLogicOpWithSameOpcodeHands(). If we don't check for other uses, we can 
      increase the instruction count.
      
      This could also fight with transforms trying to go in the opposite direction 
      and possibly blow up/infinite loop. This might be enough to solve the bug 
      noted here:
      http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20181203/608593.html
      
      I did not add the hasOneUse() checks to all opcodes because I see a perf 
      regression for at least one opcode. We may decide that's irrelevant in the
      face of potential compiler crashing, but I'll see if I can salvage that first.
      
      llvm-svn: 348508
      c3717cd0
    • Louis Dionne's avatar
      [libcxx] Add XFAILs for aligned allocation tests on AppleClang 9 · 2a23317e
      Louis Dionne authored
      Some people are still running the test suite using AppleClang 9.
      
      llvm-svn: 348507
      2a23317e
    • Sanjay Patel's avatar
      db6396b8
    • Zachary Turner's avatar
      [PDB] Move some code around. NFC. · a93458b0
      Zachary Turner authored
      llvm-svn: 348505
      a93458b0
    • Joel E. Denny's avatar
      [CUDA] Fix nvidia-cuda-toolkit detection on Ubuntu · 6dd34dc3
      Joel E. Denny authored
      This just extends D40453 (r319317) to Ubuntu.
      
      Reviewed By: Hahnfeld, tra
      
      Differential Revision: https://reviews.llvm.org/D55269
      
      llvm-svn: 348504
      6dd34dc3
    • Nico Weber's avatar
      [gn build] Process .def.in files in llvm/Config and add lib/Target/BUILD.gn · 1be23a90
      Nico Weber authored
      Tweak write_cmake_config.py to also handle variable references looking @FOO@
      (matching CMake's configure_file() function), and make it replace '\' 'n' in
      values with a newline literal since there's no good portable way of passing a
      real newline literal on a command line.
      
      Use that to process all the .def.in files in llvm/include/Config and add
      llvm/lib/Target/BUILD.gn, which (indirectly, through llvm-c/Target.h) includes
      them.
      
      Differential Revision: https://reviews.llvm.org/D55184
      
      llvm-svn: 348503
      1be23a90
    • Adrian Prantl's avatar
      Add another ArchSpec unit test. · 96f69637
      Adrian Prantl authored
      llvm-svn: 348502
      96f69637
    • Sanjay Patel's avatar
      [DAGCombiner] refactor function that hoists bitwise logic; NFCI · e9bf78fa
      Sanjay Patel authored
        
      Added FIXME and TODO comments for lack of safety checks.
      This function is a suspect in out-of-memory errors as discussed in
      the follow-up thread to r347917:
      http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20181203/608593.html
      
      llvm-svn: 348501
      e9bf78fa
    • David Carlier's avatar
      [Sanitizer] getmntinfo support in FreeBSD · 51e820d0
      David Carlier authored
      Reviewers: krytarowski
      
      Reviewed By: krytarowski
      
      Differential Revision: https://reviews.llvm.org/D55354
      
      llvm-svn: 348500
      51e820d0
    • Zachary Turner's avatar
      Support skewed stream arrays. · 579264bd
      Zachary Turner authored
      VarStreamArray was built on the assumption that it is backed by a
      StreamRef, and offset 0 of that StreamRef is the first byte of the first
      record in the array.
      
      This is a logical and intuitive assumption, but unfortunately we have
      use cases where it doesn't hold. Specifically, a PDB module's symbol
      stream is prefixed by 4 bytes containing a magic value, and the first
      byte of record data in the array is actually at offset 4 of this byte
      sequence.
      
      Previously, we would just truncate the first 4 bytes and then construct
      the VarStreamArray with the resulting StreamRef, so that offset 0 of the
      underlying stream did correspond to the first byte of the first record,
      but this is problematic, because symbol records reference other symbol
      records by the absolute offset including that initial magic 4 bytes. So
      if another record wants to refer to the first record in the array, it
      would say "the record at offset 4".
      
      This led to extremely confusing hacks and semantics in loading code, and
      after spending 30 minutes trying to get some math right and failing, I
      decided to fix this in the underlying implementation of VarStreamArray.
      Now, we can say that a stream is skewed by a particular amount. This
      way, when we access a record by absolute offset, we can use the same
      values that the records themselves contain, instead of having to do
      fixups.
      
      Differential Revision: https://reviews.llvm.org/D55344
      
      llvm-svn: 348499
      579264bd
    • Simon Pilgrim's avatar
      [X86] Refactored IsSplatVector to use switch. NFCI. · bb650dae
      Simon Pilgrim authored
      Initial step towards making the function more generic (and probably move into SelectionDAG).
      
      This is necessary to avoid massive codegen bloat for PR38243 (Add modulo rotate support to LowerRotate).
      
      llvm-svn: 348498
      bb650dae
    • Alexey Bataev's avatar
      [DEBUGINFO, NVPTX] Disable emission of ',debug' option if only debug directives are allowed. · 2e1a7821
      Alexey Bataev authored
      Summary:
      If the output of debug directives only is requested, we should drop
      emission of ',debug' option from the target directive. Required for
      supporting of nvprof profiler.
      
      Reviewers: echristo
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46061
      
      llvm-svn: 348497
      2e1a7821
    • Alexandros Lamprineas's avatar
      [GVN] Don't perform scalar PRE on GEPs · e4c91f5c
      Alexandros Lamprineas authored
      Partial Redundancy Elimination of GEPs prevents CodeGenPrepare from
      sinking the addressing mode computation of memory instructions back
      to its uses. The problem comes from the insertion of PHIs, which
      confuse CGP and make it bail.
      
      I've autogenerated the check lines of an existing test and added a
      store instruction to demonstrate the motivation behind this change.
      The store is now using the gep instead of a phi.
      
      Differential Revision: https://reviews.llvm.org/D55009
      
      llvm-svn: 348496
      e4c91f5c
    • Alexey Bataev's avatar
      [DEBUGINFO, NVPTX]Emit last debugging directives. · 64ad0ad5
      Alexey Bataev authored
      Summary:
      We may end up with not emitted debug directives at the end of the module
      emission. Patch fixes this problem emitting those last directives the
      end of the module emission.
      
      Reviewers: echristo
      
      Subscribers: jholewinski, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54320
      
      llvm-svn: 348495
      64ad0ad5
  2. Dec 06, 2018