diff options
author | Matthias Braun <matze@braunis.de> | 2018-07-12 18:33:32 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2018-07-12 18:33:32 +0000 |
commit | 9436570cbdee971868943c2214a71a25f90773c4 (patch) | |
tree | 51820babb678f513b7ffaa3d93b1ccb83cfceb9b /llvm/lib/CodeGen/ResetMachineFunctionPass.cpp | |
parent | a2a251215b1c893799bd67746e0a42d18d59263a (diff) | |
download | bcm5719-llvm-9436570cbdee971868943c2214a71a25f90773c4.tar.gz bcm5719-llvm-9436570cbdee971868943c2214a71a25f90773c4.zip |
CodeGen: Remove pipeline dependencies on StackProtector; NFC
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 (D37580, D37581, D37582, D37583, D37584, D37585, D37586, 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@immunant.com>
Differential Revision: https://reviews.llvm.org/D49256
llvm-svn: 336929
Diffstat (limited to 'llvm/lib/CodeGen/ResetMachineFunctionPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ResetMachineFunctionPass.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp b/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp index 88d550e14a3..a02302e6ff9 100644 --- a/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp +++ b/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp @@ -18,6 +18,7 @@ #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/StackProtector.h" #include "llvm/CodeGen/Passes.h" #include "llvm/IR/DiagnosticInfo.h" #include "llvm/Support/Debug.h" @@ -44,6 +45,11 @@ namespace { StringRef getPassName() const override { return "ResetMachineFunction"; } + void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addPreserved<StackProtector>(); + MachineFunctionPass::getAnalysisUsage(AU); + } + bool runOnMachineFunction(MachineFunction &MF) override { // No matter what happened, whether we successfully selected the function // or not, nothing is going to use the vreg types after us. Make sure they |