1. May 28, 2018
    • Ilya Biryukov's avatar
      [clangd] Remove accessors for top-level decls from preamble · da0256f2
      Ilya Biryukov authored
      Summary:
      They cause lots of deserialization and are not actually used.
      The ParsedAST accessor that previously returned those was renamed from
      getTopLevelDecls to getLocalTopLevelDecls in order to avoid
      confusion.
      
      This change should considerably improve the speed of findDefinition
      and other features that try to find AST nodes, corresponding to the
      locations in the source code.
      
      Reviewers: ioeric, sammccall
      
      Reviewed By: sammccall
      
      Subscribers: klimek, mehdi_amini, MaskRay, jkorous, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D47331
      
      llvm-svn: 333371
      da0256f2
    • Ilya Biryukov's avatar
      [clangd] Fix leak sanitizers warnings in clangd · 981a35d8
      Ilya Biryukov authored
      The commit includes two changes:
      1. Set DisableFree to false when building the ParsedAST.
         This is sane default, since clangd never wants to leak the AST.
      2. Make sure CompilerInstance created in code completion is passed to
         the FrontendAction::BeginSourceFile call.
         We have to do this to make sure the memory buffers of remapped
         files are properly freed.
      
      Our tests do not produce any warnings under asan anymore.
      The changes are mostly trivial, just moving the code around. So
      sending without review.
      
      llvm-svn: 333370
      981a35d8
    • Ilya Biryukov's avatar
      [clangd] Workaround the comments crash, reenable the test. · 30b04b18
      Ilya Biryukov authored
      This fix is still quite fragile, the underlying problem is that the
      code should not rely on source ranges coming from the preamble to be
      correct when reading from the text buffers.
      This is probably not possible to achieve in practice, so we would
      probably have to keep the contents of old headers around for the
      lifetime of the preamble.
      
      llvm-svn: 333369
      30b04b18
    • Joachim Protze's avatar
      [OMPT] Rename ompt_wait_id to omp_wait_id · 40636133
      Joachim Protze authored
      Rename ompt_wait_id to omp_wait_id, as defined in the spec.
      
      Differential Revision: https://reviews.llvm.org/D46530
      
      llvm-svn: 333368
      40636133
    • Joachim Protze's avatar
      [OMPT] Rename ompt_frame_t to omp_frame_t · c5836064
      Joachim Protze authored
      Rename ompt_frame_t to omp_frame_t, as defined in the spec.
      
      Differential Revision: https://reviews.llvm.org/D43568
      
      llvm-svn: 333367
      c5836064
    • Tobias Grosser's avatar
      [ScopInfo] Update Scop::addUserContext() to C++ interface · 9b9c7010
      Tobias Grosser authored
      Summary: This patch updates `Scop::addUserContext()` function to the new C++ interface and replaces the `auto` keyword with explicit type wherever used in this function.
      
      Reviewers: grosser, bollu, philip.pfaffe, chelini, Meinersbur
      
      Reviewed By: grosser
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D47438
      
      llvm-svn: 333366
      9b9c7010
    • Craig Topper's avatar
      [X86] Stop forcing X86VPermi2X node index operand to match destination type to... · 26bc8486
      Craig Topper authored
      [X86] Stop forcing X86VPermi2X node index operand to match destination type to make masking pattern matching easier. Add extra patterns with bitcasts instead.
      
      This basically reverts r280696 in favor of using extra patterns as mentioned as an alternative in that commit message. For now I've only added the cases we have test cases for, but it should be easy to add more in the future.
      
      This will help to convert VPERMI2PS/VPERMT2PS intrinsics to use a single ISD node opcode. And hopefully allow some intrinsics to be removed.
      
      llvm-svn: 333365
      26bc8486
    • Bob Wilson's avatar
      NFC: Fix some comment typos. · c791417a
      Bob Wilson authored
      llvm-svn: 333364
      c791417a
    • Andrea Di Biagio's avatar
      [Tablegen] Avoid generating empty switch statements. NFC · df8e9199
      Andrea Di Biagio authored
      This fixes an MSVC warning (warning C4065: switch statement contains 'default'
      but no 'case' labels) introduced with revision 333293.
      
      llvm-svn: 333363
      df8e9199
    • Tim Renouf's avatar
      [AMDGPU] Fixed WWM bug in block otherwise entirely in WQM · 364edcd2
      Tim Renouf authored
      Summary:
      For a block with WQM on entry and exit and containing no exact mode
      code, but containing some WWM code, the WQM pass forgot to process the
      block at all and so did not insert code to enter and leave WWM.
      
      This commit fixes that.
      
      Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D47027
      
      Change-Id: I044792eead1293bed4203fb26ce75f47878afeb6
      llvm-svn: 333362
      364edcd2
    • Jonas Hahnfeld's avatar
      [OMPT] Fix test parallel/not_enough_threads.c · 3c6595d6
      Jonas Hahnfeld authored
      Upcoming changes to FileCheck will modify CHECK-DAG to not match
      overlapping regions of the input. This test was found to be affected
      because it expects to find four threads to invoke events of type
      ompt_event_implicit_task_begin. It turns out this is wrong because
      OMP_THREAD_LIMIT is set to 2, so there are only two threads. The
      rest of the test got it right so it went unnoticed until now.
      
      (Rewrite test and apply clang-format to it as discussed in the past.)
      
      Differential Revision: https://reviews.llvm.org/D47119
      
      llvm-svn: 333361
      3c6595d6
  2. May 27, 2018
    • Simon Pilgrim's avatar
      [X86] Don't hardcode scheduler class · 79dae5ba
      Simon Pilgrim authored
      Also fixes BEXTRI instruction to use WritBEXTR class, which was missed when the class was added.
      
      llvm-svn: 333360
      79dae5ba
    • David Green's avatar
      Revert 333358 as it's failing on some builders. · aee7ad0c
      David Green authored
      I'm guessing the tests reply on the ARM backend being built.
      
      llvm-svn: 333359
      aee7ad0c
    • David Green's avatar
      [UnrollAndJam] Add a new Unroll and Jam pass · 3034281b
      David Green authored
      This is a simple implementation of the unroll-and-jam classical loop
      optimisation.
      
      The basic idea is that we take an outer loop of the form:
      
      for i..
        ForeBlocks(i)
        for j..
          SubLoopBlocks(i, j)
        AftBlocks(i)
      
      Instead of doing normal inner or outer unrolling, we unroll as follows:
      
      for i... i+=2
        ForeBlocks(i)
        ForeBlocks(i+1)
        for j..
          SubLoopBlocks(i, j)
          SubLoopBlocks(i+1, j)
        AftBlocks(i)
        AftBlocks(i+1)
      Remainder
      
      So we have unrolled the outer loop, then jammed the two inner loops into
      one. This can lead to a simpler inner loop if memory accesses can be shared
      between the now-jammed loops.
      
      To do this we have to prove that this is all safe, both for the memory
      accesses (using dependence analysis) and that ForeBlocks(i+1) can move before
      AftBlocks(i) and SubLoopBlocks(i, j).
      
      Differential Revision: https://reviews.llvm.org/D41953
      
      llvm-svn: 333358
      3034281b
    • Eric Christopher's avatar
      Remove boolean argument from isSuitableFromBSS. · 958a1f8d
      Eric Christopher authored
      The argument was used as an additional negative condition and can be
      expressed in the if conditional without needing to pass it down.
      Update bss commentary around main use.
      
      llvm-svn: 333357
      958a1f8d
    • Eric Christopher's avatar
      Cleanups for getKindForGlobal: · ed169ec4
      Eric Christopher authored
       - Clarify block comment
       - Make Function/GlobalVariable split more explicit.
       - Move locals closer to uses.
      
      llvm-svn: 333356
      ed169ec4
    • Eric Christopher's avatar
      Tidy some language in the xray documentation. · 66c5bbc5
      Eric Christopher authored
      llvm-svn: 333354
      66c5bbc5
    • Raphael Isemann's avatar
      Fix memory leak in SubsPrimitiveParmItanium · 59949471
      Raphael Isemann authored
      Summary:
      FastDemangle gives us a C-string that we own (which is allocated in SymbolDemangler::GetDemangledCopy).
      As we are not deleting the string, we leak memory whenever we call SubsPrimitiveParmItanium.
      
      Reviewers: javed.absar
      
      Subscribers: kristof.beyls, chrib, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D47418
      
      llvm-svn: 333353
      59949471
    • Fangrui Song's avatar
      [DebugInfo] Fix typo. NFC · 8e4633aa
      Fangrui Song authored
      llvm-svn: 333352
      8e4633aa
    • JF Bastien's avatar
      Revert "Add nonnull; use it for atomics" · f764dbd0
      JF Bastien authored
      That's r333325, as well as follow-up "Fix GCC handling of ATOMIC_VAR_INIT"
      r333327.
      
      Marshall asked to revert:
      
      Let's have a discussion about how to implement this so that it is more friendly
      to people with installed code bases. We've had *extremely* loud responses to
      unilaterally adding warnings - especially ones that can't be easily disabled -
      to the libc++ code base in the past.
      
      llvm-svn: 333351
      f764dbd0
    • Jonas Devlieghere's avatar
      [dwarfdump] Make -c and -p work together · cb547cbb
      Jonas Devlieghere authored
      When requesting to dump both the parent chain and children, we used to
      print the DIE more than once because we propagated the dump options to
      the parent without clearing the respective flags. This commit fixes this
      oversight and adds a test.
      
      rdar://39415292
      
      Differential revision: https://reviews.llvm.org/D47263
      
      llvm-svn: 333350
      cb547cbb
    • Craig Topper's avatar
      Revert r333347 "[X86] Rewrite the max and min reduction intrinsics to make... · f99532fa
      Craig Topper authored
      Revert r333347 "[X86] Rewrite the max and min reduction intrinsics to make better use of other functions and to reduce width to 256 and 128 bits were possible."
      
      This wasn't supposed to be commited yet.
      
      llvm-svn: 333349
      f99532fa
    • Craig Topper's avatar
      [X86] Remove mask from avx512ifma builtins. Use a select instruction instead. · 387b1423
      Craig Topper authored
      This reduces from 12 builtins to 6 since we no longer need a mask and maskz version.
      
      llvm-svn: 333348
      387b1423
    • Craig Topper's avatar
      [X86] Rewrite the max and min reduction intrinsics to make better use of other... · e091523c
      Craig Topper authored
      [X86] Rewrite the max and min reduction intrinsics to make better use of other functions and to reduce width to 256 and 128 bits were possible.
      
      Summary:
      We only need to use 512 bit vectors all the way through v8i64 reductions since those max instructions are new to avx512f and only available in 512 bits until SKX.
      
      For v16i32 and floating point we have legacy 128/256 bit instructions we can use.
      
      I've tried to use other intrinsics to reduce the verbosity of the code and avoid having to mention all the shuffles. I've also removed all the -1 shuffle indices so the output sequence is fully specified and not left to backend optimization.
      
      Reviewers: RKSimon, spatel, GBuella
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D47401
      
      llvm-svn: 333347
      e091523c
    • Craig Topper's avatar
      [X86] Remove masking from avx512ifma intrinsics. Use a select instead. · 51eddb87
      Craig Topper authored
      This allows us to avoid having mask and maskz variant. Reducing from 12 intrinsics to 6.
      
      llvm-svn: 333346
      51eddb87
  3. May 26, 2018