summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon
diff options
context:
space:
mode:
authorJosh Magee <joshua_magee@playstation.sony.com>2013-12-19 03:17:11 +0000
committerJosh Magee <joshua_magee@playstation.sony.com>2013-12-19 03:17:11 +0000
commit22b8ba2d67693f8e35d0b48db9ea0e48b66ba280 (patch)
treeb483ee80b3d3dc95f22544c50b973396a12ae9d7 /llvm/lib/Target/Hexagon
parentc4327996caeda7f8bd3ae0ca8209261de53d5c64 (diff)
downloadbcm5719-llvm-22b8ba2d67693f8e35d0b48db9ea0e48b66ba280.tar.gz
bcm5719-llvm-22b8ba2d67693f8e35d0b48db9ea0e48b66ba280.zip
[stackprotector] Use analysis from the StackProtector pass for stack layout in PEI a nd LocalStackSlot passes.
This changes the MachineFrameInfo API to use the new SSPLayoutKind information produced by the StackProtector pass (instead of a boolean flag) and updates a few pass dependencies (to preserve the SSP analysis). The stack layout follows the same approach used prior to this change - i.e., only LargeArray stack objects will be placed near the canary and everything else will be laid out normally. After this change, structures containing large arrays will also be placed near the canary - a case previously missed by the old implementation. Out of tree targets will need to update their usage of MachineFrameInfo::CreateStackObject to remove the MayNeedSP argument. The next patch will implement the rules for sspstrong and sspreq. The end goal is to support ssp-strong stack layout rules. WIP. Differential Revision: http://llvm-reviews.chandlerc.com/D2158 llvm-svn: 197653
Diffstat (limited to 'llvm/lib/Target/Hexagon')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp b/llvm/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp
index 44234e85dc6..552cac22eef 100644
--- a/llvm/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp
@@ -42,6 +42,7 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<MachineFunctionAnalysis>();
AU.addPreserved<MachineFunctionAnalysis>();
+ AU.addPreserved("stack-protector");
FunctionPass::getAnalysisUsage(AU);
}
};
OpenPOWER on IntegriCloud