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 (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>
Good call on moving this into StackProtector, it's definitely better here.