1. Jun 12, 2021
    • Denys Shabalin's avatar
      Introduce alloca_scope op · fdc0d436
      Denys Shabalin authored
      ## Introduction
      
      This proposal describes the new op to be added to the `std` (and later moved `memref`)
      dialect called `alloca_scope`.
      
      ## Motivation
      
      Alloca operations are easy to misuse, especially if one relies on it while doing
      rewriting/conversion passes. For example let's consider a simple example of two
      independent dialects, one defines an op that wants to allocate on-stack and
      another defines a construct that corresponds to some form of looping:
      
      ```
      dialect1.looping_op {
        %x = dialect2.stack_allocating_op
      }
      ```
      
      Since the dialects might not know about each other they are going to define a
      lowering to std/scf/etc independently:
      
      ```
      scf.for … {
         %x_temp = std.alloca …
         … // do some domain-specific work using %x_temp buffer
         … // and store the result into %result
         %x = %result
      }
      ```
      
      Later on the scf and `std.alloca` is going to be lowered to llvm using a
      combination of `llvm.alloca` and unstructured control flow.
      
      At this point the use of `%x_temp` is bound to either be either optimized by
      llvm (for example using mem2reg) or in the worst case: perform an independent
      stack allocation on each iteration of the loop. While the llvm optimizations are
      likely to succeed they are not guaranteed to do so, and they provide
      opportunities for surprising issues with unexpected use of stack size.
      
      ## Proposal
      
      We propose a new operation that defines a finer-grain allocation scope for the
      alloca-allocated memory called `alloca_scope`:
      
      ```
      alloca_scope {
         %x_temp = alloca …
         ...
      }
      ```
      
      Here the lifetime of `%x_temp` is going to be bound to the narrow annotated
      region within `alloca_scope`. Moreover, one can also return values out of the
      alloca_scope with an accompanying `alloca_scope.return` op (that behaves
      similarly to `scf.yield`):
      
      ```
      %result = alloca_scope {
         %x_temp = alloca …
         …
         alloca_scope.return %myvalue
      }
      ```
      
      Under the hood the `alloca_scope` is going to lowered to a combination of
      `llvm.intr.stacksave` and `llvm.intr.strackrestore` that are going to be invoked
      automatically as control-flow enters and leaves the body of the `alloca_scope`.
      
      The key value of the new op is to allow deterministic guaranteed stack use
      through an explicit annotation in the code which is finer-grain than the
      function-level scope of `AutomaticAllocationScope` interface. `alloca_scope`
      can be inserted at arbitrary locations and doesn’t require non-trivial
      transformations such as outlining.
      
      ## Which dialect
      
      Before memref dialect is split, `alloca_scope` can temporarily reside in `std`
      dialect, and later on be moved to `memref` together with the rest of
      memory-related operations.
      
      ## Implementation
      
      An implementation of the op is available [here](https://reviews.llvm.org/D97768).
      
      Original commits:
      
      * Add initial scaffolding for alloca_scope op
      * Add alloca_scope.return op
      * Add no region arguments and variadic results
      * Add op descriptions
      * Add failing test case
      * Add another failing test
      * Initial implementation of lowering for std.alloca_scope
      * Fix backticks
      * Fix getSuccessorRegions implementation
      
      Reviewed By: ftynse
      
      Differential Revision: https://reviews.llvm.org/D97768
      fdc0d436
    • Jonas Devlieghere's avatar
      [lldb] Support new objective-c hash table layout · fc71a5c6
      Jonas Devlieghere authored
      Update LLDB for thew new Objective-C hash table layout in the dyld
      shared cache found in macOS Monterey.
      
      rdar://72863911
      fc71a5c6
    • Jonas Devlieghere's avatar
      c7dee6ae
    • Valery N Dmitriev's avatar
      [SLP][NFC] Fix condition that was supposed to save a bit of compile time. · 94a07c79
      Valery N Dmitriev authored
      It was found by chance revealing discrepancy between comment (few lines above),
      the condition and how re-ordering of instruction is done inside the if statement
      it guards. The condition was always evaluated to true.
      
      Differential Revision: https://reviews.llvm.org/D104064
      94a07c79
    • LLVM GN Syncbot's avatar
      [gn build] Port c54d3050 · ee98f600
      LLVM GN Syncbot authored
      ee98f600
    • Louis Dionne's avatar
      [libc++] NFC: Move indirect_concepts.h to __iterator/concepts.h · c54d3050
      Louis Dionne authored
      There's no fundamental reason to separate those from the other iterator
      concepts.
      
      Differential Revision: https://reviews.llvm.org/D104048
      c54d3050
    • Guozhi Wei's avatar
      [X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization · f35bcea1
      Guozhi Wei authored
      In function searchALUInst, sub register usage of LEA dest should also block LEA/SUB optimization, otherwise the sub register usage gets an undefined value.
      
      This patch fixes https://bugs.llvm.org/show_bug.cgi?id=50615.
      
      Differential Revision: https://reviews.llvm.org/D103922
      f35bcea1
    • Louis Dionne's avatar
      [libc++] Enable the synchronization library on Apple platforms · f84dbd2f
      Louis Dionne authored
      The synchronization library was marked as disabled on Apple platforms
      up to now because we were not 100% sure that it was going to be ABI
      stable. However, it's been some time since we shipped it in upstream
      libc++ now and there's been no changes so far. This patch enables the
      synchronization library on Apple platforms, and hence commits the ABI
      stability as far as that vendor is concerned.
      
      Differential Revision: https://reviews.llvm.org/D96790
      f84dbd2f
    • LLVM GN Syncbot's avatar
      [gn build] Port 9106047e · 2244a0f5
      LLVM GN Syncbot authored
      2244a0f5
    • zoecarver's avatar
      [libcxx][ranges] Add range.subrange. · 9106047e
      zoecarver authored
      Basically the title.
      
      Differential Revision: https://reviews.llvm.org/D102006
      9106047e
    • Adam Nemet's avatar
      [Matrix] In transpose opts, handle a^t * a^t · e0efebb8
      Adam Nemet authored
      Without the fix the testcase crashes because we remove the same instruction
      twice.
      
      Differential Revision: https://reviews.llvm.org/D104127
      e0efebb8
    • Aaron En Ye Shi's avatar
      [HIP] Fix --hip-version flag with 0 as component · f2cc0427
      Aaron En Ye Shi authored
      Allow the usage of minor version 0, for hip versions
      such as 4.0. Change the default values when performing
      version checks.
      
      Reviewed By: yaxunl
      
      Differential Revision: https://reviews.llvm.org/D104062
      f2cc0427
    • Ayush Sahay's avatar
      [lldb-vscode] Synchronize calls to SendTerminatedEvent · 5ef51771
      Ayush Sahay authored
      If an inferior exits prior to the processing of a disconnect request,
      then the threads executing EventThreadFunction and request_discontinue
      respectively may call SendTerminatedEvent simultaneously, in turn,
      testing and/or setting g_vsc.sent_terminated_event without any
      synchronization. In case the thread executing EventThreadFunction sets
      it before the thread executing request_discontinue has had a chance to
      test it, the latter would move ahead to issue a response to the
      disconnect request. Said response may be dispatched ahead of the
      terminated event compelling the client to terminate the debug session
      without consuming any console output that might've been generated by
      the execution of terminateCommands.
      
      Reviewed By: clayborg, wallace
      
      Differential Revision: https://reviews.llvm.org/D103609
      5ef51771
    • Aaron Ballman's avatar
      Update the C status page somewhat. · 82a3b606
      Aaron Ballman authored
      This adds implementation information for N2607,
      clarifies that C17 only resolved defect reports,
      and adds -std= information for the different versions.
      82a3b606
  2. Jun 11, 2021