[PATCH] D98200: [GlobalISel] Port over the SelectionDAG stack protector codegen feature.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 8 10:41:53 PST 2021


aemerson created this revision.
aemerson added reviewers: paquette, arsenm, dsanders, foad, Petar.Avramovic.
aemerson added a project: LLVM.
Herald added subscribers: hiraditya, rovka, mgorny, dschuff.
aemerson requested review of this revision.
Herald added subscribers: aheejin, wdng.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98200

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98200.329069.patch
Type: text/x-patch
Size: 50575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210308/4563b6f7/attachment.bin>


More information about the llvm-commits mailing list