Mercurial > hg > CbC > CbC_llvm
diff lib/CodeGen/ShrinkWrap.cpp @ 120:1172e4bd9c6f
update 4.0.0
author | mir3636 |
---|---|
date | Fri, 25 Nov 2016 19:14:25 +0900 |
parents | 7d135dc70f03 |
children | 803732b1fca8 |
line wrap: on
line diff
--- a/lib/CodeGen/ShrinkWrap.cpp Tue Jan 26 22:56:36 2016 +0900 +++ b/lib/CodeGen/ShrinkWrap.cpp Fri Nov 25 19:14:25 2016 +0900 @@ -199,9 +199,7 @@ MachineFunctionPass::getAnalysisUsage(AU); } - const char *getPassName() const override { - return "Shrink Wrapping analysis"; - } + StringRef getPassName() const override { return "Shrink Wrapping analysis"; } /// \brief Perform the shrink-wrapping analysis and update /// the MachineFrameInfo attached to \p MF with the results. @@ -256,8 +254,8 @@ /// \brief Helper function to find the immediate (post) dominator. template <typename ListOfBBs, typename DominanceAnalysis> -MachineBasicBlock *FindIDom(MachineBasicBlock &Block, ListOfBBs BBs, - DominanceAnalysis &Dom) { +static MachineBasicBlock *FindIDom(MachineBasicBlock &Block, ListOfBBs BBs, + DominanceAnalysis &Dom) { MachineBasicBlock *IDom = &Block; for (MachineBasicBlock *BB : BBs) { IDom = Dom.findNearestCommonDominator(IDom, BB); @@ -521,9 +519,9 @@ << ' ' << Save->getName() << "\nRestore: " << Restore->getNumber() << ' ' << Restore->getName() << '\n'); - MachineFrameInfo *MFI = MF.getFrameInfo(); - MFI->setSavePoint(Save); - MFI->setRestorePoint(Restore); + MachineFrameInfo &MFI = MF.getFrameInfo(); + MFI.setSavePoint(Save); + MFI.setRestorePoint(Restore); ++NumCandidates; return false; }