[PATCH] [stack protector] Improved data layout rules, WIP, part 3
Josh Magee
Joshua_Magee at playstation.sony.com
Tue Nov 12 16:25:43 PST 2013
jmagee added you to the CC list for the revision "[stack protector] Improved data layout rules, WIP, part 3".
Hi,
This is the third part in a series of patches that will update the stack layout
rules for SSP, specifically to support the ssp-strong rules.
The breakdown of the series is:
Patch 1 [DONE]: Split the StackProtector pass from a single cpp file,
StackProtector.cpp, into StackProtector.h and StackProtector.cpp.
- Committed in r191570.
- Review at: http://llvm-reviews.chandlerc.com/D1521
Patch 2 [DONE]: Update the StackProtector pass to do the datalayout analysis.
- Committed in r193653.
- Review at: http://llvm-reviews.chandlerc.com/D1789
Patch 3 [This patch]: Use the new layout analysis to replicate the old layout behaviour.
- This changes the MachineFrameInfo API to use the new
SSPLayoutKind information (instead of a boolean flag) and updates a few
pass dependencies (to preserve the SSP analysis).
- The actual layout is roughly the same - i.e., only LargeArray stack objects
will be placed near the canary. Everything else is laid out normally. Note
that the stack layout is not be identical in all cases because the current
heuristic used for layout (MayNeedSP) misses structures that contain large
arrays.
- I included new test cases for verifying the layout for ssp. Equivalent
cases for sspreq and sspstrong will be included in the next patch.
Patch 4: A patch that implements the improved layout rules.
- This patch would change the PrologueEpilogInserter and
LocalStackSlotAllocation passes to follow the extended stack layout rules
for sspstrong and sspreq.
- This patch would also include the documentation updates and final tests.
Thanks,
Josh
http://llvm-reviews.chandlerc.com/D2158
Files:
include/llvm/CodeGen/MachineFrameInfo.h
include/llvm/CodeGen/StackProtector.h
lib/CodeGen/LocalStackSlotAllocation.cpp
lib/CodeGen/MachineFunction.cpp
lib/CodeGen/MachineFunctionPass.cpp
lib/CodeGen/Passes.cpp
lib/CodeGen/PrologEpilogInserter.cpp
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/StackProtector.cpp
lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp
lib/Target/NVPTX/NVPTXAllocaHoisting.h
lib/Target/NVPTX/NVPTXLowerAggrCopies.h
lib/Target/NVPTX/NVPTXSplitBBatBar.h
lib/Target/X86/X86FastISel.cpp
test/CodeGen/ARM/ssp-data-layout.ll
test/CodeGen/X86/ssp-data-layout.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2158.1.patch
Type: text/x-patch
Size: 38186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131112/a94ce61c/attachment.bin>
More information about the llvm-commits
mailing list