From 90ad6835ddaad46efff327db0e2c83bfb1563075 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 13 Jul 2018 00:08:38 +0000 Subject: CodeGen: Remove pipeline dependencies on StackProtector; NFC This re-applies r336929 with a fix to accomodate for the Mips target scheduling multiple SelectionDAG instances into the pass pipeline. 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 Differential Revision: https://reviews.llvm.org/D49256 llvm-svn: 336964 --- llvm/lib/CodeGen/GlobalISel/Localizer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/CodeGen/GlobalISel/Localizer.cpp') diff --git a/llvm/lib/CodeGen/GlobalISel/Localizer.cpp b/llvm/lib/CodeGen/GlobalISel/Localizer.cpp index d7dc2c2c18c..52b340753a5 100644 --- a/llvm/lib/CodeGen/GlobalISel/Localizer.cpp +++ b/llvm/lib/CodeGen/GlobalISel/Localizer.cpp @@ -44,6 +44,11 @@ bool Localizer::shouldLocalize(const MachineInstr &MI) { } } +void Localizer::getAnalysisUsage(AnalysisUsage &AU) const { + getSelectionDAGFallbackAnalysisUsage(AU); + MachineFunctionPass::getAnalysisUsage(AU); +} + bool Localizer::isLocalUse(MachineOperand &MOUse, const MachineInstr &Def, MachineBasicBlock *&InsertMBB) { MachineInstr &MIUse = *MOUse.getParent(); -- cgit v1.2.3