[PATCH] D49256: CodeGen: Remove pipeline dependencies on StackProtector; NFC

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 10:53:31 PDT 2018


MatzeB created this revision.
MatzeB added reviewers: rinon, thegameg.
Herald added a subscriber: mcrosier.

Note: This just an updated version of a patch by @rinon:

- Merge SSPLK enums
- Initialize MachineFrameInfo once per function (not once per BB)
- Stop MachineFunctionPasses to preserve StackProtector by default. Unfortunately this requires to add the preserved flag to all GlobalISel passes as they schedule a fallback SelectionDAG instance later in the pipeline...

Commit Message:

PrologEpilogInserter and StackColoring depend on the StackProtector analysis
being alive from the point it is run until PEI, which requires that they are all
scheduled in the same FunctionPassManager. Inserting a (machine) ModulePass
between StackProtector and PEI results in these passes being in separate
FunctionPassManagers and the StackProtector is not available for PEI.

PEI and StackColoring don't use much information from the StackProtector pass,
so transfering the required information to MachineFrameInfo is cleaner than
keeping the StackProtector pass around. This commit moves the SSP layout
information to MFI instead of keeping it in the pass.

This patch set (https://reviews.llvm.org/D37580, https://reviews.llvm.org/D37581, https://reviews.llvm.org/D37582, https://reviews.llvm.org/D37583, https://reviews.llvm.org/D37584, https://reviews.llvm.org/D37585, https://reviews.llvm.org/D37586, https://reviews.llvm.org/D37587)
is a first draft of the pagerando implementation described in
http://lists.llvm.org/pipermail/llvm-dev/2017-June/113794.html.

Patch by Stephen Crane <sjc at immunant.com>


Repository:
  rL LLVM

https://reviews.llvm.org/D49256

Files:
  include/llvm/CodeGen/GlobalISel/Localizer.h
  include/llvm/CodeGen/GlobalISel/Utils.h
  include/llvm/CodeGen/MachineFrameInfo.h
  include/llvm/CodeGen/StackProtector.h
  lib/CodeGen/GlobalISel/IRTranslator.cpp
  lib/CodeGen/GlobalISel/InstructionSelect.cpp
  lib/CodeGen/GlobalISel/Legalizer.cpp
  lib/CodeGen/GlobalISel/Localizer.cpp
  lib/CodeGen/GlobalISel/RegBankSelect.cpp
  lib/CodeGen/GlobalISel/Utils.cpp
  lib/CodeGen/LocalStackSlotAllocation.cpp
  lib/CodeGen/MachineFunctionPass.cpp
  lib/CodeGen/PrologEpilogInserter.cpp
  lib/CodeGen/ResetMachineFunctionPass.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  lib/CodeGen/StackColoring.cpp
  lib/CodeGen/StackProtector.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49256.155221.patch
Type: text/x-patch
Size: 24317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180712/5f949358/attachment.bin>


More information about the llvm-commits mailing list