1. May 17, 2023
  2. May 16, 2023
    • Tom Dohrmann's avatar
      fix stack probe lowering for x86_intrcc · df309b12
      Tom Dohrmann authored
      The x86_intrcc calling convention will build two STACKALLOC_W_PROBING machine instructions if the function takes an error code. This is caused by an additional call to emitSPUpdate in llvm/lib/Target/X86/X86FrameLowering.cpp:1650. Previously only the first STACKALLOC_W_PROBING machine instruction was properly handled, the second one was simply ignored. This lead to miscompilations where the stack pointer wasn't properly updated (see https://github.com/rust-lang/rust/issues/109918). This patch fixes this by handling all STACKALLOC_W_PROBING machine instructions.
      
      To be honest I don't quite understand why this didn't lead to more noticeable miscompilations previously.
      
      This is my first time contributing to LLVM.
      
      Reviewed By: pengfei
      
      Differential Revision: https://reviews.llvm.org/D150033
      
      (cherry picked from commit f6154364)
      df309b12
    • Valentin Clement's avatar
      [flang] Fix optional assertion in PFTBuilder · 1a04a5f1
      Valentin Clement authored
      D142279 enabled assertion in libstdc++ and one was triggered
      in the PFTBuilder because an optional was access even if it was
      null.
      This patch fix this issue and add a regression test.
      
      Reviewed By: jeanPerier
      
      Differential Revision: https://reviews.llvm.org/D143589
      
      (cherry picked from commit 3f55311a)
      1a04a5f1
    • Alan Zhao's avatar
      [clang] Fix default initializers being ignored when initializing templated aggregate types · bef3459f
      Alan Zhao authored
      Previously, when checking whether an in-class initializer exists when
      performing parenthesized aggregate initialization, Clang checks that the
      output of FieldDecl::getInClassInitializer() is non-null. This is
      incorrect; if the field is part of a templated type, then
      getInClassInitializer() will return nullptr if we haven't called
      Sem::BuildCXXDefaultInitExpr(...) before, even if
      FieldDecl::hasInClassInitializer() returns true. The end result is that
      Clang incorrectly ignores the in class initializer and
      value-initializes the field. The fix therefore is to instead call
      FieldDecl::hasInClassInitializer(), which is what we do for braced init
      lists [0].
      
      Before this patch, Clang does correctly recognize the in-class field
      initializer in certain cases. This is Sema::BuildCXXDefaultInitExpr(...)
      populates the in class initializer of the corresponding FieldDecl
      object. Therefore, if that method was previously called with the same
      FieldDecl object, as can happen with a decltype(...) or a braced list
      initialization, FieldDecl::getInClassInitializer() will return a
      non-null expression, and the field becomes properly initialized.
      
      Fixes 62266
      
      [0]: https://github.com/llvm/llvm-project/blob/be5f35e24f4c15caf3c4aeccddc54c52560c28a0/clang/lib/Sema/SemaInit.cpp#L685
      
      Reviewed By: shafik
      
      Differential Revision: https://reviews.llvm.org/D149389
      bef3459f
  3. May 14, 2023
  4. May 06, 2023
  5. May 03, 2023
  6. May 02, 2023
  7. Apr 27, 2023
    • Leandro Lupori's avatar
      [compiler-rt] Fix invalid triple on ARM build · bd6783b3
      Leandro Lupori authored
      The fuzzer build was failing on armv7l, with an invalid triple
      error. This happened because CMake's get_compiler_rt_target
      function was missing some code to correctly handle arm archs,
      such as armhf.
      
      This was originaly part of https://reviews.llvm.org/D140011, that
      landed on main with commit cd173cbd.
      
      Fixes #60115
      
      Differential Revision: https://reviews.llvm.org/D142906
      bd6783b3
    • Leandro Lupori's avatar
      [compiler-rt] Fix scudo build on ARM · ccbab597
      Leandro Lupori authored
      The build of scudo was failing on armv7l, with undefined references
      to unwinder symbols, such as __aeabi_unwind_cpp_pr0. These are
      needed by RTGwpAsan and thus, on ARM, scudo must also be linked
      against an unwind library.
      
      The cmake command that caused the build failure was:
      
      cmake --fresh -S "$PWD/llvm/" -B "$PWD/build/" -G Ninja \
        -DCMAKE_INSTALL_PREFIX="$PWD/install" \
        -DCMAKE_BUILD_TYPE=Release \
        -DLLVM_ENABLE_PROJECTS="clang;lld;lldb;clang-tools-extra;polly" \
        -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
        -DLLVM_TOOLCHAIN_TOOLS="llvm-ar;llvm-ranlib;llvm-objdump;\
      llvm-rc;llvm-cvtres;llvm-nm;llvm-strings;llvm-readobj;\
      llvm-dlltool;llvm-pdbutil;llvm-objcopy;llvm-strip;llvm-cov;\
      llvm-profdata;llvm-addr2line;llvm-symbolizer;llvm-windres;llvm-ml;\
      llvm-readelf;llvm-size" \
        -DLLVM_INSTALL_BINUTILS_SYMLINKS=OFF -DLLVM_PARALLEL_LINK_JOBS=1
      
      Fixes #60115
      
      Reviewed By: hctim
      
      Differential Revision: https://reviews.llvm.org/D142888
      
      (cherry picked from commit e1e97268)
      ccbab597
  8. Apr 21, 2023
  9. Apr 20, 2023
  10. Apr 19, 2023
  11. Apr 17, 2023
  12. Apr 14, 2023