MMI must match the function passed, and MF has a handle on MMI. Use that instead
of accepting it as separate argument. No Functional Change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279701
91177308-0d34-0410-b5e6-
96231b3b80d8
public:
/// Prepare to run on a specific machine function.
/// @param TailDupSize - Maxmimum size of blocks to tail-duplicate.
- void initMF(MachineFunction &MF, const MachineModuleInfo *MMI,
+ void initMF(MachineFunction &MF,
const MachineBranchProbabilityInfo *MBPI,
unsigned TailDupSize = 0);
bool tailDuplicateBlocks();
auto MBPI = &getAnalysis<MachineBranchProbabilityInfo>();
- Duplicator.initMF(MF, MMI, MBPI);
+ Duplicator.initMF(MF, MBPI);
bool MadeChange = false;
while (Duplicator.tailDuplicateBlocks())
namespace llvm {
void TailDuplicator::initMF(MachineFunction &MFin,
- const MachineModuleInfo *MMIin,
const MachineBranchProbabilityInfo *MBPIin,
unsigned TailDupSizeIn) {
MF = &MFin;
TII = MF->getSubtarget().getInstrInfo();
TRI = MF->getSubtarget().getRegisterInfo();
MRI = &MF->getRegInfo();
- MMI = MMIin;
+ MMI = &MF->getMMI();
MBPI = MBPIin;
TailDupSize = TailDupSizeIn;