[all-commits] [llvm/llvm-project] 708a47: [RISCV] Add stack clash protection (#117612)

Raphael Moreira Zinsly via All-commits all-commits at lists.llvm.org
Tue Dec 10 08:48:48 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 708a478d6739aea20a8834cea45490f05b07ca10
      https://github.com/llvm/llvm-project/commit/708a478d6739aea20a8834cea45490f05b07ca10
  Author: Raphael Moreira Zinsly <rzinsly at ventanamicro.com>
  Date:   2024-12-10 (Tue, 10 Dec 2024)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    M llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
    M llvm/lib/Target/RISCV/RISCVFrameLowering.h
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.h
    M llvm/lib/Target/RISCV/RISCVInstrInfo.td
    M llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.cpp
    M llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h
    M llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
    A llvm/test/CodeGen/RISCV/stack-clash-prologue-nounwind.ll
    A llvm/test/CodeGen/RISCV/stack-clash-prologue.ll

  Log Message:
  -----------
  [RISCV] Add stack clash protection (#117612)

Enable `-fstack-clash-protection` for RISCV and stack probe for function
prologues.
We probe the stack by creating a loop that allocates and probe the stack
in ProbeSize chunks.
We emit an unrolled probe loop for small allocations and emit a variable
length probe loop for bigger ones.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list