mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
TailDuplication: Don't pass MMI separately from MF. NFC
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. llvm-svn: 279701
This commit is contained in:
parent
b2a5fef7df
commit
d2d132562f
@ -49,7 +49,7 @@ class TailDuplicator {
|
||||
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();
|
||||
|
@ -49,7 +49,7 @@ bool TailDuplicatePass::runOnMachineFunction(MachineFunction &MF) {
|
||||
|
||||
auto MBPI = &getAnalysis<MachineBranchProbabilityInfo>();
|
||||
|
||||
Duplicator.initMF(MF, MMI, MBPI);
|
||||
Duplicator.initMF(MF, MBPI);
|
||||
|
||||
bool MadeChange = false;
|
||||
while (Duplicator.tailDuplicateBlocks())
|
||||
|
@ -57,14 +57,13 @@ static cl::opt<unsigned> TailDupLimit("tail-dup-limit", cl::init(~0U),
|
||||
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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user