1. Apr 29, 2024
  2. Apr 27, 2024
  3. Apr 26, 2024
    • Simon Pilgrim's avatar
    • Fangrui Song's avatar
      [MC] Rename temporary symbols of empty name to ".L0 " (#89693) · bf67610a
      Fangrui Song authored
      Temporary symbols generated for .eh_frame and .debug_line have an empty
      name, which appear in .symtab in the presence of RISC-V style linker
      relaxation and will not be discarded by ld/objcopy --discard-locals
      (-X).
      
      In contrast, GNU assembler's riscv port assigns a fake name ".L0 " (with
      a trailing space) to these symbols so that will be discarded by
      ld/objcopy --discard-locals.
      
      This patch matches the GNU behavior. Since Clang's RISC-V targets pass
      -X to ld, and GNU ld defaults to -X for RISC-V targets, these ".L0 "
      symbols will be discarded after linking by default, as expected by
      users.
      
      The llvm-symbolizer special case for RISC-V `SF_FormatSpecific` symbols
      https://reviews.llvm.org/D98669 needs to be adjusted.
      
      Note: `"":` in assembly currently crashes.
      
      Note: bolt tests used /usr/bin/clang before
      llvmorg-19-init-9532-g59bfc310.
      The revert llvmorg-19-init-9531-g28b55342 actually broke
      bolt/test/RISCV/fake-label-no-entry.c
      bf67610a
    • Diego Caballero's avatar
      [mlir] Add sub-byte type emulation support for `memref.collapse_shape` (#89962) · 571831a6
      Diego Caballero authored
      This PR adds support for `memref.collapse_shape` to sub-byte type emulation. The `memref.collapse_shape` becomes a no-opt given that we are flattening the memref as part of the emulation (i.e., we are collapsing all the dimensions).
      571831a6
    • Jie Fu's avatar
      [mlir] Fix -Wdeprecated-declarations of cast in VCIXToLLVMIRTranslation.cpp (NFC) · 64d514a2
      Jie Fu authored
      In file included from /llvm-project/mlir/lib/Target/LLVMIR/Dialect/VCIX/VCIXToLLVMIRTranslation.cpp:70:
      /llvm-project/build-Release/tools/mlir/include/mlir/Dialect/LLVMIR/VCIXConversions.inc:8:48: error: 'cast' is deprecated: Use mlir::cast<U>() instead [-Werror,-Wdeprecated-declarations]
            VectorType vt = op.getResult().getType().cast<VectorType>();
                                                     ^
      /llvm-project/mlir/include/mlir/IR/Types.h:345:9: note: 'cast' has been explicitly marked deprecated here
      U Type::cast() const {
              ^
      In file included from /llvm-project/mlir/lib/Target/LLVMIR/Dialect/VCIX/VCIXToLLVMIRTranslation.cpp:70:
      /llvm-project/build-Release/tools/mlir/include/mlir/Dialect/LLVMIR/VCIXConversions.inc:8:48: error: 'cast<mlir::VectorType>' is deprecated: Use mlir::cast<U>() instead [-Werror,-Wdeprecated-declarations]
            VectorType vt = op.getResult().getType().cast<VectorType>();
                                                     ^
      /llvm-project/mlir/include/mlir/IR/Types.h:112:5: note: 'cast<mlir::VectorType>' has been explicitly marked deprecated here
        [[deprecated("Use mlir::cast<U>() instead")]]
          ^
      In file included from /llvm-project/mlir/lib/Target/LLVMIR/Dialect/VCIX/VCIXToLLVMIRTranslation.cpp:70:
      /llvm-project/build-Release/tools/mlir/include/mlir/Dialect/LLVMIR/VCIXConversions.inc:32:48: error: 'cast' is deprecated: Use mlir::cast<U>() instead [-Werror,-Wdeprecated-declarations]
            VectorType vt = op.getResult().getType().cast<VectorType>();
                                                     ^
      /llvm-project/mlir/include/mlir/IR/Types.h:345:9: note: 'cast' has been explicitly marked deprecated here
      U Type::cast() const {
              ^
      In file included from /llvm-project/mlir/lib/Target/LLVMIR/Dialect/VCIX/VCIXToLLVMIRTranslation.cpp:70:
      /llvm-project/build-Release/tools/mlir/include/mlir/Dialect/LLVMIR/VCIXConversions.inc:32:48: error: 'cast<mlir::VectorType>' is deprecated: Use mlir::cast<U>() instead [-Werror,-Wdeprecated-declarations]
            VectorType vt = op.getResult().getType().cast<VectorType>();
                                                     ^
      /llvm-project/mlir/include/mlir/IR/Types.h:112:5: note: 'cast<mlir::VectorType>' has been explicitly marked deprecated here
        [[deprecated("Use mlir::cast<U>() instead")]]
          ^
      4 errors generated.
      64d514a2
    • NagyDonat's avatar
      [clang-tidy][NFC] Fix broken link in documentation of cert-env33-c (#90216) · 2d09ac40
      NagyDonat authored
      It seems that the description of the SEI CERT rules was moved from
      `www.securecoding.cert.org` to `wiki.sei.cmu.edu` and the page IDs were
      not preserved during the transition.
      
      However, the old domain name redirects to the new one and permalinks
      derived from the name of the rule still work, so I kept using the old
      domain name to be consistent with other documentation files using it.
      2d09ac40
    • Xiaoyang Liu's avatar
      [libc++][ranges] LWG3984: ranges::to's recursion branch may be ill-formed (#87964) · e74be35c
      Xiaoyang Liu authored
      
      
      This pull request implements LWG3984: ranges::to's recursion branch
      may be ill-formed.
      
      In the current implementation, ranges::to's recursion branch pipes the
      range into a `views::transform(/* lambda */)`, which is a __range_adaptor_closure
      object. In libc++, the pipe operator of __range_adaptor_closure requires a
      viewable_range, so the following code won't compile, as the type of lvalue
      `r` doesn't model viewable_range:
      
        #include <ranges>
        #include <vector>
        #include <list>
      
        int main() {
          std::vector<std::vector<int>> v;
          auto r = std::views::all(std::move(v));
          auto l = std::ranges::to<std::list<std::list<int>>>(r);
        }
      
      Co-authored-by: default avatarA. Jiang <de34@live.cn>
      e74be35c