From b915e9e0fc85ba6f398b3fab0db6a81a8913af94 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 2 Jan 2017 19:17:04 +0000 Subject: Vendor import of llvm trunk r290819: https://llvm.org/svn/llvm-project/llvm/trunk@290819 --- lib/CodeGen/MachineFunctionPass.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/CodeGen/MachineFunctionPass.cpp') diff --git a/lib/CodeGen/MachineFunctionPass.cpp b/lib/CodeGen/MachineFunctionPass.cpp index 228fe170ab46..2265676ff8b1 100644 --- a/lib/CodeGen/MachineFunctionPass.cpp +++ b/lib/CodeGen/MachineFunctionPass.cpp @@ -22,7 +22,7 @@ #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h" #include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineFunctionAnalysis.h" +#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/StackProtector.h" #include "llvm/IR/Dominators.h" @@ -41,7 +41,9 @@ bool MachineFunctionPass::runOnFunction(Function &F) { if (F.hasAvailableExternallyLinkage()) return false; - MachineFunction &MF = getAnalysis().getMF(); + MachineModuleInfo &MMI = getAnalysis(); + MachineFunction &MF = MMI.getMachineFunction(F); + MachineFunctionProperties &MFProps = MF.getProperties(); #ifndef NDEBUG @@ -49,7 +51,7 @@ bool MachineFunctionPass::runOnFunction(Function &F) { errs() << "MachineFunctionProperties required by " << getPassName() << " pass are not met by function " << F.getName() << ".\n" << "Required properties: "; - RequiredProperties.print(errs(), /*OnlySet=*/true); + RequiredProperties.print(errs()); errs() << "\nCurrent properties: "; MFProps.print(errs()); errs() << "\n"; @@ -60,13 +62,13 @@ bool MachineFunctionPass::runOnFunction(Function &F) { bool RV = runOnMachineFunction(MF); MFProps.set(SetProperties); - MFProps.clear(ClearedProperties); + MFProps.reset(ClearedProperties); return RV; } void MachineFunctionPass::getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(); - AU.addPreserved(); + AU.addRequired(); + AU.addPreserved(); // MachineFunctionPass preserves all LLVM IR passes, but there's no // high-level way to express this. Instead, just list a bunch of -- cgit v1.2.3