1. Jan 28, 2023
  2. Jan 27, 2023
    • Nico Weber's avatar
      b59bc781
    • Samuel Parker's avatar
      Revert "[DAGCombine] fp_to_sint isSaturatingMinMax" · e60b91df
      Samuel Parker authored
      This reverts commit 85395af2.
      
      This is causing trouble with scalable vectors.
      e60b91df
    • Lucas Prates's avatar
      [NFC][AArch64] Get extension strings directly from ArchInfo in target parser · 852bb68d
      Lucas Prates authored
      Reviewed By: tmatheson
      
      Differential Revision: https://reviews.llvm.org/D142541
      852bb68d
    • Tue Ly's avatar
      [libc][cmake] Fix LIBC_TARGET_OS query from compiler triple for `darwin`. · a369bb8a
      Tue Ly authored
      Currently LIBC_TARGET_OS query from compiler triple returns `apple` for
      macOS.  This change will fix it back to `darwin` as before.
      
      Differential Revision: https://reviews.llvm.org/D141282
      a369bb8a
    • Tom Stellard's avatar
      Workflows: Fix version-check.py script for when there is no RC tag yet · 57b491b5
      Tom Stellard authored
      Reviewed By: thieta
      
      Differential Revision: https://reviews.llvm.org/D142598
      57b491b5
    • Matthias Springer's avatar
      [mlir] GreedyPatternRewriteDriver: Move strict mode to GreedyPatternRewriteDriver · 6bdecbcb
      Matthias Springer authored
      `strictMode` is moved to GreedyRewriteConfig to simplify the API and state of rewriter classes. The region-based GreedyPatternRewriteDriver now also supports strict mode.
      
      MultiOpPatternRewriteDriver becomes simpler: fewer method must be overridden.
      
      Differential Revision: https://reviews.llvm.org/D142623
      6bdecbcb
    • Florian Hahn's avatar
      [SCCP] Use range info to prove AddInst has NSW flag. · 72121a20
      Florian Hahn authored
      This patch updates SCCP to use the value ranges of AddInst operands to
      try to prove the AddInst does not overflow in the signed sense and
      adds the NSW flag. The reasoning is done with
      makeGuaranteedNoWrapRegion (thanks @nikic for point it out!).
      
      Follow-ups will include extending this to more
      OverflowingBinaryOperators.
      
      Depends on D142387.
      
      Reviewed By: nikic
      
      Differential Revision: https://reviews.llvm.org/D142390
      72121a20
    • Matthias Springer's avatar
      [mlir] GreedyPatternRewriteDriver: All entry points take a config · 977cddb9
      Matthias Springer authored
      The multi-op entry point now also takes a GreedyPatternRewriteConfig and respects config.maxNumRewrites. The scope is also a part of the config now.
      
      Differential Revision: https://reviews.llvm.org/D142614
      977cddb9
    • Michael Buch's avatar
      [lldb][Target] GetScratchTypeSystems: sort TypeSystems with strict weak ordering · 78fee46d
      Michael Buch authored
      `std::sort` requires a comparison operator that obides by strict weak
      ordering. `operator<=` on pointer does not and leads to undefined
      behaviour. Specifically, when we grow the `scratch_type_systems` vector
      slightly larger (and thus take `std::sort` down a slightly different
      codepath), we segfault. This happened while working on a patch that
      would in fact grow this vector. In such a case ASAN reports:
      
      ```
      $ ./bin/lldb ./lldb-test-build.noindex/lang/cpp/complete-type-check/TestCppIsTypeComplete.test_builtin_types/a.out -o "script -- lldb.target.FindFirstType(\"void\")"
      (lldb) script -- lldb.target.FindFirstType("void")
      =================================================================
      ==59975==ERROR: AddressSanitizer: container-overflow on address 0x000108f6b510 at pc 0x000280177b4c bp 0x00016b7d7430 sp 0x00016b7d7428
      READ of size 8 at 0x000108f6b510 thread T0
          #0 0x280177b48 in std::__1::shared_ptr<lldb_private::TypeSystem>::shared_ptr[abi:v15006](std::__1::shared_ptr<lldb_private::TypeSystem> const&)+0xb4 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0x177b48)
      (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #1 0x280dcc008 in void std::__1::__introsort<std::__1::_ClassicAlgPolicy, lldb_private::Target::GetScratchTypeSystems(bool)::$_3&, std::__1::shared_ptr<lldb_private::TypeSystem>*>(std::__1::shared_ptr<lldb_private::TypeSystem>*, std::__1::shared_
      ptr<lldb_private::TypeSystem>*, lldb_private::Target::GetScratchTypeSystems(bool)::$_3&, std::__1::iterator_traits<std::__1::shared_ptr<lldb_private::TypeSystem>*>::difference_type)+0x1050 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblld
      b.17.0.0git.dylib:arm64+0xdcc008) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #2 0x280d88788 in lldb_private::Target::GetScratchTypeSystems(bool)+0x5a4 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0xd88788) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #3 0x28021f0b4 in lldb::SBTarget::FindFirstType(char const*)+0x624 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0x21f0b4) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #4 0x2804e9590 in _wrap_SBTarget_FindFirstType(_object*, _object*)+0x26c (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0x4e9590) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #5 0x1062d3ad4 in cfunction_call+0x5c (/opt/homebrew/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/Python:arm64+0xcfad4) (BuildId: c9efc4bbb1943f9a9b7cc4e91fce477732000000200000000100000000000d00)
      
      <--- snipped --->
      
      0x000108f6b510 is located 400 bytes inside of 512-byte region [0x000108f6b380,0x000108f6b580)
      allocated by thread T0 here:
          #0 0x105209414 in wrap__Znwm+0x74 (/Applications/Xcode2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.3/lib/darwin/libclang_rt.asan_osx_dynamic.dylib:arm64e+0x51414) (BuildId: 0a44828ceb64337bbfff60b22cd838f0320000
      00200000000100000000000b00)
          #1 0x280dca3b4 in std::__1::__split_buffer<std::__1::shared_ptr<lldb_private::TypeSystem>, std::__1::allocator<std::__1::shared_ptr<lldb_private::TypeSystem>>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<std::__1::shared_pt
      r<lldb_private::TypeSystem>>&)+0x11c (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0xdca3b4) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #2 0x280dc978c in void std::__1::vector<std::__1::shared_ptr<lldb_private::TypeSystem>, std::__1::allocator<std::__1::shared_ptr<lldb_private::TypeSystem>>>::__push_back_slow_path<std::__1::shared_ptr<lldb_private::TypeSystem> const&>(std::__1::s
      hared_ptr<lldb_private::TypeSystem> const&)+0x13c (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0xdc978c) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #3 0x280d88dec in std::__1::vector<std::__1::shared_ptr<lldb_private::TypeSystem>, std::__1::allocator<std::__1::shared_ptr<lldb_private::TypeSystem>>>::push_back[abi:v15006](std::__1::shared_ptr<lldb_private::TypeSystem> const&)+0x80 (/Users/mic
      haelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0xd88dec) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #4 0x280d8857c in lldb_private::Target::GetScratchTypeSystems(bool)+0x398 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0xd8857c) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #5 0x28021f0b4 in lldb::SBTarget::FindFirstType(char const*)+0x624 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0x21f0b4) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #6 0x2804e9590 in _wrap_SBTarget_FindFirstType(_object*, _object*)+0x26c (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0x4e9590) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
          #7 0x1062d3ad4 in cfunction_call+0x5c (/opt/homebrew/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/Python:arm64+0xcfad4) (BuildId: c9efc4bbb1943f9a9b7cc4e91fce477732000000200000000100000000000d00)
          #8 0x10627fff0 in _PyObject_MakeTpCall+0x7c (/opt/homebrew/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/Python:arm64+0x7bff0) (BuildId: c9efc4bbb1943f9a9b7cc4e91fce477732000000200000000100000000000d00)
          #9 0x106378a98 in _PyEval_EvalFrameDefault+0xbcf8 (/opt/homebrew/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/Python:arm64+0x174a98) (BuildId: c9efc4bbb1943f9a9b7cc4e91fce477732000000200000000100000000000d00)
      ```
      
      Differential Revision: https://reviews.llvm.org/D142709
      78fee46d
    • Lucas Prates's avatar
      [NFC][AArch64] Get default features directly from ArchInfo and CpuInfo objects · 0753cf2c
      Lucas Prates authored
      This updates the AArch64's Target Parser and its uses to capture
      information about default features directly from ArchInfo and CpuInfo
      objects, instead of relying on an API function to access them
      indirectly.
      
      Reviewed By: tmatheson
      
      Differential Revision: https://reviews.llvm.org/D142540
      0753cf2c
    • Lucas Prates's avatar
      [NFC][AArch64] Use optional returns in target parser instead of 'invalid' objects · 9ea00fc7
      Lucas Prates authored
      This updates the parsing methods in AArch64's Target Parser to make use
      of optional returns instead of "invalid" enum values, making the API's
      behaviour clearer.
      
      Reviewed By: lenary, tmatheson
      
      Differential Revision: https://reviews.llvm.org/D142539
      9ea00fc7
    • Luca Di Sera's avatar
      Add clang_CXXMethod_isExplicit to libclang · 0a51bc73
      Luca Di Sera authored
      The new method is a wrapper of `CXXConstructorDecl::isExplicit` and
      `CXXConversionDecl::isExplicit`, allowing the user to recognize whether
      the declaration pointed to by a cursor was marked with the explicit
      specifier.
      
      An export for the function, together with its documentation, was added
      to "clang/include/clang-c/Index.h" with an implementation provided in
      "clang/tools/libclang/CIndex.cpp".
      
      The implementation is based on similar `clang_CXXMethod`
      implementations, returning a falsy unsigned value when the cursor is not
      a declaration, is not a declaration for a constructor or conversion
      function or is not a relevant declaration that was marked with the
      `explicit` specifier.
      
      The new symbol was added to "clang/tools/libclang/libclang.map" to be
      exported, under the LLVM16 tag.
      
      "clang/tools/c-index-test/c-index-test.c" was modified to print a
      specific tag, "(explicit)", for cursors that are recognized by
      `clang_CXXMethod_isExplicit`.
      
      Two new regression files, "ex...
      0a51bc73