1. Dec 20, 2021
  2. Dec 19, 2021
  3. Dec 20, 2021
    • Nikita Popov's avatar
      [Attributes] Add AttributeList ctor from AttributeSet (NFC) · 6e30cb76
      Nikita Popov authored
      It was already possible to create an AttributeList from an Index
      and an AttributeSet. However, this would actually end up using
      the implicit constructor on AttrBuilder, thus doing an unnecessary
      conversion from AttributeSet to AttrBuilder to AttributeSet.
      Instead we can accept the AttributeSet directly, as that is what
      we need anyway.
      6e30cb76
    • Pavel Labath's avatar
      [lldb/python] Fix a compile error in 7406d236 · 6c2bf012
      Pavel Labath authored
      cannot pass object of non-trivial type
      'lldb_private::python::PythonObject' through variadic function
      6c2bf012
    • Pavel Labath's avatar
      [lldb/python] Fix (some) dangling pointers in our glue code · 7406d236
      Pavel Labath authored
      This starts to fix the other half of the lifetime problems in this code
      -- dangling references. SB objects created on the stack will go away
      when the function returns, which is a problem if the python code they
      were meant for stashes a reference to them somewhere.  Most of the time
      this goes by unnoticed, as the code rarely has a reason to store these,
      but in case it does, we shouldn't respond by crashing.
      
      This patch fixes the management for a couple of SB objects (Debugger,
      Frame, Thread). The SB objects are now created on the heap, and
      their ownership is immediately passed on to SWIG, which will ensure they
      are destroyed when the last python reference goes away. I will handle
      the other objects in separate patches.
      
      I include one test which demonstrates the lifetime issue for SBDebugger.
      Strictly speaking, one should create a test case for each of these
      objects and each of the contexts they are being used. That would require
      figuring out how to persist (and later access) each of these objects.
      Some of those may involve a lot of hoop-jumping (we can run python code
      from within a frame-format string). I don't think that is
      necessary/worth it since the new wrapper functions make it very hard to
      get this wrong.
      
      Differential Revision: https://reviews.llvm.org/D115925
      7406d236
    • LLVM GN Syncbot's avatar
      [gn build] Port 754ea6fd · 3b2fd945
      LLVM GN Syncbot authored
      3b2fd945
    • Konstantin Varlamov's avatar
      [libc++][ranges] Implement `uninitialized_value_construct{,_n}` and `uninitialized_fill{,_n}`. · 754ea6fd
      Konstantin Varlamov authored
      Also:
      - refactor out `__voidify`;
      - use the `destroy` algorithm internally;
      - refactor out helper classes used in tests for `uninitialized_*`
        algorithms.
      
      Differential Revision: https://reviews.llvm.org/D115626
      754ea6fd
    • Kazu Hirata's avatar
      [ObjectYAML] Use llvm::all_of (NFC) · 32de467f
      Kazu Hirata authored
      32de467f
    • Marek Kurdej's avatar
      [clang-format] Fix wrong indentation of namespace identifiers after a concept declaration. · 960712cc
      Marek Kurdej authored
      Before this patch, the code:
      ```
      template <class T>
      concept a_concept = X<>;
      namespace B {
      struct b_struct {};
      } // namespace B
      ```
      with config:
      ```
      NamespaceIndentation: None
      ```
      
      was wrongly indented inside namespace B, giving:
      ```
      template <class T>
      concept a_concept = X<>;
      namespace B {
        struct b_struct {};
      } // namespace B
      ```
      
      Fixes https://github.com/llvm/llvm-project/issues/50645
      
      Reviewed By: MyDeveloperDay, owenpan
      
      Differential Revision: https://reviews.llvm.org/D116008
      960712cc
    • Kazu Hirata's avatar
      [ARM] Use range-based for loops (NFC) · 93d79cac
      Kazu Hirata authored
      93d79cac
    • Mehdi Amini's avatar
      Revert "[MLIR] rewrite AffineStructures and Presburger tests to use the parser" · 6963be12
      Mehdi Amini authored
      This reverts commit b0e8667b.
      
      ASAN/UBSAN bot is broken with this trace:
      
      [ RUN      ] FlatAffineConstraintsTest.FindSampleTest
      llvm-project/mlir/include/mlir/Support/MathExtras.h:27:15: runtime error: signed integer overflow: 1229996100002 * 809999700000 cannot be represented in type 'long'
          #0 0x7f63ace960e4 in mlir::ceilDiv(long, long) llvm-project/mlir/include/mlir/Support/MathExtras.h:27:15
          #1 0x7f63ace8587e in ceil llvm-project/mlir/include/mlir/Analysis/Presburger/Fraction.h:57:42
          #2 0x7f63ace8587e in operator* llvm-project/llvm/include/llvm/ADT/STLExtras.h:347:42
          #3 0x7f63ace8587e in uninitialized_copy<llvm::mapped_iterator<mlir::Fraction *, long (*)(mlir::Fraction), long>, long *> include/c++/v1/__memory/uninitialized_algorithms.h:36:62
          #4 0x7f63ace8587e in uninitialized_copy<llvm::mapped_iterator<mlir::Fraction *, long (*)(mlir::Fraction), long>, long *> llvm-project/llvm/include/llvm/ADT/SmallVector.h:490:5
          #5 0x7f63ace8587e in append<llvm::mapped_iterator<mlir::Fraction *, long (*)(mlir::Fraction), long>, void> llvm-project/llvm/include/llvm/ADT/SmallVector.h:662:5
          #6 0x7f63ace8587e in SmallVector<llvm::mapped_iterator<mlir::Fraction *, long (*)(mlir::Fraction), long> > llvm-project/llvm/include/llvm/ADT/SmallVector.h:1204:11
          #7 0x7f63ace8587e in mlir::FlatAffineConstraints::findIntegerSample() const llvm-project/mlir/lib/Analysis/AffineStructures.cpp:1171:27
          #8 0x7f63ae95a84d in mlir::checkSample(bool, mlir::FlatAffineConstraints const&, mlir::TestFunction) llvm-project/mlir/unittests/Analysis/AffineStructuresTest.cpp:37:23
          #9 0x7f63ae957545 in mlir::FlatAffineConstraintsTest_FindSampleTest_Test::TestBody() llvm-project/mlir/unittests/Analysis/AffineStructuresTest.cpp:222:3
      6963be12
    • Mehdi Amini's avatar
      Move getAsmBlockArgumentNames from OpAsmDialectInterface to OpAsmOpInterface · 7f9e9c7f
      Mehdi Amini authored
      This method is more suitable as an opinterface: it seems intrinsic to
      individual instances of the operation instead of the dialect.
      Also remove the restriction on the interface being applicable to the entry block only.
      
      Differential Revision: https://reviews.llvm.org/D116018
      7f9e9c7f
    • jacquesguan's avatar
      [Clang][RISCV] Fix upper bound of RISC-V V type in debug info · 9c11e952
      jacquesguan authored
      The UpperBound of RVV type in debug info should be elements count minus one,
      as the LowerBound start from zero.
      
      Reviewed By: HsiangKai
      
      Differential Revision: https://reviews.llvm.org/D115430
      9c11e952
    • Shilei Tian's avatar
      [Clang] Add helper text to fopenmp_version_EQ to make it show in help menu · 0060060f
      Shilei Tian authored
      For now if we check `clang --help`, it doesn't show `-fopenmp-version`. This option
      should be visible to users. In addition, it is not set to hidden in
      `clang/include/clang/Driver/Options.td` as well. The reason it doesn't show is
      there is no corresponding helper text. This patch simply adds it.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D115998
      0060060f
    • Esme-Yi's avatar
      [DebugInfo][Clang] record the access flag for class/struct/union types. · 18f087c2
      Esme-Yi authored
      Summary: This patch records the access flag for
      class/struct/union types in the clang part.
      
      The summary of binary size change and debug info size change due to the DW_AT_accessibility attribute are as the following table. They are built with flags of `clang -O0 -g` (no -gz).
      
      | section | before | after | change | % |
      | .debug_loc | 929821 | 929821 |0|0|
      |.debug_abbrev | 5885289 | 5971547 |+86258|+1.466%|
      |.debug_info | 497613455 | 498122074 |+508619|+0.102%|
      |.debug_ranges | 45731664 | 45731664 |0|0|
      |.debug_str | 233842595 | 233839388 |-3207| -0.001%|
      |.debug_line | 149773166 | 149764583 |-8583|-0.006%|
      |total (debug) |933775990 |934359077|+583087 |+0.062%|
      
      |total (binary) |1394617288 | 1395200024| +582736|+0.042%|
      
      Reviewed By: dblaikie, shchenz
      
      Differential Revision: https://reviews.llvm.org/D115503
      18f087c2
    • Shao-Ce SUN's avatar
      [RISCV] Remove Zvamo Extention · 68bc6d7c
      Shao-Ce SUN authored
      Based on D111692. Zvamo is not part of the 1.0 V spec. Remove it.
      
      Reviewed By: arcbbb
      
      Differential Revision: https://reviews.llvm.org/D115709
      68bc6d7c
    • David Green's avatar
      [ARM] Fold away CMP/CSINC from CMOV · 4ece4cd7
      David Green authored
      This makes use of the code in D114013 to fold away unnecessary
      CMPZ/CSINC starting from a CMOV, in a similar way to how we fold away
      CSINV/CSINC/etc
      
      Differential Revision: https://reviews.llvm.org/D115185
      4ece4cd7
    • Aleksandr Platonov's avatar
      [clangd] Fix undefined behavior when generating error message at rename with an invalid name · 555eacf7
      Aleksandr Platonov authored
      `Message()` lambda uses `Reason.Details` as an input parameter for `llvm::formatv()`, but `Reason` in `Message()` is a local object.
      Return value of `llvm::formatv()` contains references to its input arguments, thus `Message()` returns an object which contains a reference to `Details` field of the local object `Reason`.
      This patch fixes this behavior by passing `Reason` as a reference to `Message()` to ensure that return value of `Message()` contains references to alive object and also prevents copying of `InvalidName` structure at passing it to `makeError()`.
      
      Provided test passes on Linux+GCC with or without this patch, but fails on Windows+VisualStudio without this patch.
      
      Reviewed By: sammccall
      
      Differential Revision: https://reviews.llvm.org/D115959
      555eacf7
    • Sanjay Patel's avatar
      [CodeGen] remove creation of FP cast function attribute · 1965cc46
      Sanjay Patel authored
      This is the last cleanup step resulting from D115804 .
      Now that clang uses intrinsics when we're in the special FP mode,
      we don't need a function attribute as an indicator to the backend.
      The LLVM part of the change is in D115885.
      
      Differential Revision: https://reviews.llvm.org/D115886
      1965cc46
    • Sanjay Patel's avatar
      5bb21cea
    • Arjun P's avatar
      [MLIR] Simplex: split some basic functionality out into a SimplexBase class · 4fa96b7e
      Arjun P authored
      This is a purely mechanical patch moving some functionality out from the
      `Simplex` class out into a `SimplexBase` class. This pavees the way for
      a future patch adding support for lexicographic optimization with a class
      `LexSimplex`, which will inherit from `SimplexBase`. Inheriting directly
      from `Simplex` would bring many additional functions that would not work in
      `LexSimplex` because it operates slighty differently from `Simplex`. So We
      split out only the basic functionality it needs to inherit into `SimplexBase`.
      
      Reviewed By: Groverkss
      
      Differential Revision: https://reviews.llvm.org/D115831
      4fa96b7e
    • bakhtiyar's avatar
      Make AsyncParallelForRewrite parameterizable with a cost model which drives... · ec0e4545
      bakhtiyar authored
      Make AsyncParallelForRewrite parameterizable with a cost model which drives deciding the parallelization granularity.
      
      Reviewed By: ezhulenev, mehdi_amini
      
      Differential Revision: https://reviews.llvm.org/D115423
      ec0e4545
    • Simon Pilgrim's avatar
      [X86][AVX512] cvt_by_vec_width - don't hardcode the schedule class. NFC. · 47bd9ebd
      Simon Pilgrim authored
      Pull out the WriteMove schedule class into the cvt_mask_by_elt_width wrapper
      47bd9ebd
  4. Dec 19, 2021