[all-commits] [llvm/llvm-project] cfef18: [GlobalISel] Port over the SelectionDAG stack prot...

Amara Emerson via All-commits all-commits at lists.llvm.org
Mon Oct 4 21:34:11 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cfef1803dd83fc2447c295742710a09e8e17aa22
      https://github.com/llvm/llvm-project/commit/cfef1803dd83fc2447c295742710a09e8e17aa22
  Author: Amara Emerson <amara at apple.com>
  Date:   2021-10-04 (Mon, 04 Oct 2021)

  Changed paths:
    A llvm/include/llvm/CodeGen/CodeGenCommonISel.h
    M llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
    M llvm/lib/CodeGen/CMakeLists.txt
    A llvm/lib/CodeGen/CodeGenCommonISel.cpp
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
    M llvm/lib/CodeGen/StackProtector.cpp
    A llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-delayed-stack-protector.ll
    R llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-stackprotect-check.ll

  Log Message:
  -----------
  [GlobalISel] Port over the SelectionDAG stack protector codegen feature.

This is a port of the feature that allows the StackProtector pass to omit
checking code for stack canary checks, and rely on SelectionDAG to do it at a
later stage. The reasoning behind this seems to be to prevent the IR checking
instructions from hindering tail-call optimizations during codegen.

Here we allow GlobalISel to also use that scheme. Doing so requires that we
do some analysis using some factored-out code to determine where to generate
code for the epilogs.

Not every case is handled in this patch since we don't have support for all
targets that exercise different stack protector schemes.

Differential Revision: https://reviews.llvm.org/D98200




More information about the All-commits mailing list