Skip to content
  1. Dec 10, 2021
  2. Dec 09, 2021
    • Jan Svoboda's avatar
      [llvm] Add null-termination capability to SmallVectorMemoryBuffer · d0262c23
      Jan Svoboda authored
      Most of `MemoryBuffer` interfaces expose a `RequiresNullTerminator` parameter that's being used to:
      * determine how to open a file (`mmap` vs `open`),
      * assert newly initialized buffer indeed has an implicit null terminator.
      
      This patch adds the paramater to the `SmallVectorMemoryBuffer` constructors, meaning:
      * null terminator can now be added to `SmallVector`s that didn't have one before,
      * `SmallVectors` that had a null terminator before keep it even after the move.
      
      In line with existing code, the new parameter is defaulted to `true`. This patch makes sure all calls to the `SmallVectorMemoryBuffer` constructor set it to `false` to preserve the current semantics.
      
      Reviewed By: dexonsmith
      
      Differential Revision: https://reviews.llvm.org/D115331
      d0262c23
    • Mircea Trofin's avatar
      [NFC][mlgo] Generalize model runner interface · 059e0347
      Mircea Trofin authored
      This prepares it for the regalloc work. Part of it is making model
      evaluation accross 'development' and 'release' scenarios more reusable.
      This patch:
      - extends support to tensors of any shape (not just scalars, like we had
      in the inliner -Oz case). While the tensor shape can be anything, we
      assume row-major layout and expose the tensor as a buffer.
      - exposes the NoInferenceModelRunner, which we use in the 'development'
      mode to keep the evaluation code path consistent and simplify logging,
      as we'll want to reuse it in the regalloc case.
      
      Differential Revision: https://reviews.llvm.org/D115306
      059e0347
    • Duncan P. N. Exon Smith's avatar
      ADT: Make StringRef::size() and StringRef::empty() constexpr · 9911589f
      Duncan P. N. Exon Smith authored
      This unblocks using `StringLiteral::size()` for a SmallVector size in
      another patch.
      
      Differential Revision: https://reviews.llvm.org/D115395
      9911589f
  3. Dec 08, 2021
    • Duncan P. N. Exon Smith's avatar
      ADT: Add SmallVectorImpl::truncate() to replace uses of set_size() · ca451d3f
      Duncan P. N. Exon Smith authored
      Add `SmallVectorImpl::truncate()`, a variant of `resize()` that cannot
      increase the size.
      
      - Compared to `resize()`, this has no code path for growing the
        allocation and can be better optimized.
      - Compared to `set_size()`, this formally calls destructors, and does
        not skip any constructors.
      - Compared to `pop_back_n()`, this takes the new desired size, which in
        many contexts is more intuitive than the number of elements to remove.
      
      The immediate motivation is to pair this with `resize_for_overwrite()`
      to remove uses of `set_size()`, which can then be made private.
      
      Differential Revision: https://reviews.llvm.org/D115383
      ca451d3f
    • Lang Hames's avatar
      [ORC] Add a MaterializationUnit::Interface struct. · ae73f3fd
      Lang Hames authored
      MaterializationUnit::Interface holds the values that make up the interface
      (for ORC's purposes) of a materialization unit: the symbol flags map and
      initializer symbol.
      
      Having a type for this will make functions that build materializer interfaces
      more readable and maintainable.
      ae73f3fd
    • James Farrell's avatar
      Revert "Revert "Use VersionTuple for parsing versions in Triple, fixing issues... · 219672b8
      James Farrell authored
      Revert "Revert "Use VersionTuple for parsing versions in Triple, fixing issues that caused the original change to be reverted. This makes it possible to distinguish between "16" and "16.0" after parsing, which previously was not possible.""
      
      This reverts commit 63a6348c.
      
      Differential Revision: https://reviews.llvm.org/D115254
      219672b8
  4. Dec 07, 2021
    • Simon Pilgrim's avatar
    • Mircea Trofin's avatar
      [mlgo][regalloc] Add score calculation for training · fa99cb64
      Mircea Trofin authored
      Add the calculation of a score, which will be used during ML training. The
      score qualifies the quality of a regalloc policy, and is independent of
      what we train (currently, just eviction), or the regalloc algo itself.
      We can then use scores to guide training (which happens offline), by
      formulating a reward based on score variation - the goal being lowering
      scores (currently, that reward is percentage reduction relative to
      Greedy's heuristic)
      
      Currently, we compute the score by factoring different instruction
      counts (loads, stores, etc) with the machine basic block frequency,
      regardless of the instructions' provenance - i.e. they could be due to
      the regalloc policy or be introduced previously. This is different from
      RAGreedy::reportStats, which accummulates the effects of the allocator
      alone. We explored this alternative but found (at least currently) that
      the more naive alternative introduced here produces better policies. We
      do intend to consolidate the two, however, as we are actively
      investigating improvements to our reward function, and will likely want
      to re-explore scoring just the effects of the allocator.
      
      In either case, we want to decouple score calculation from allocation
      algorighm, as we currently evaluate it after a few more passes after
      allocation (also, because score calculation should be reusable
      regardless of allocation algorithm).
      
      We intentionally accummulate counts independently because it facilitates
      per-block reporting, which we found useful for debugging - for instance,
      we can easily report the counts indepdently, and then cross-reference
      with perf counter measurements.
      
      Differential Revision: https://reviews.llvm.org/D115195
      fa99cb64
    • Kai Luo's avatar
      [MachineVerifier] Make TiedOpsRewritten computable in MIRParser · b206ee69
      Kai Luo authored
      This patch is to address post-commit comment https://reviews.llvm.org/D80538#anchor-inline-1091625, which make the constraint stronger based on what https://reviews.llvm.org/D80538 does, i.e., "TiedOpsRewritten is set iff leave-ssa and all tied operands share the same register".
      
      Reviewed By: MatzeB
      
      Differential Revision: https://reviews.llvm.org/D114573
      b206ee69
    • Luís Ferreira's avatar
      [Demangle] Add support for D function-local parent symbols · 83087c09
      Luís Ferreira authored
          Internally `__Sddd` function-local parent symbols are used to solve ambiguities on symbols in
          the same scope with the same mangled name.
      
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D114309
      83087c09
    • Luís Ferreira's avatar
      [Demangle] Add support for D special identifiers · 8a7ddf9e
      Luís Ferreira authored
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D114308
      8a7ddf9e
    • Noah Shutty's avatar
      [Support] [Debuginfod] Move HTTPClient to Debuginfod library. · d9941f74
      Noah Shutty authored
      Following the discussion in D112753, this moves the HTTPClient from Support to Debuginfod library so that tools depending on Support do not automatically depend on Curl as well. This also removes `HTTPClient::initialize()` and `HTTPClient::cleanup()` from `InitLLVM` so these steps should be implemented by user tools instead.
      
      Reviewed By: phosek
      
      Differential Revision: https://reviews.llvm.org/D115131
      d9941f74
  5. Dec 06, 2021
  6. Dec 03, 2021
  7. Dec 02, 2021
  8. Dec 01, 2021
  9. Nov 30, 2021
Loading