From 3ed4273d3314fea02c39440055d1529d662e18cf Mon Sep 17 00:00:00 2001 From: Kyle Butt Date: Thu, 25 Aug 2016 01:37:03 +0000 Subject: TailDuplication: Save MF and reduce number of parameters. NFC Save the function in the class, and then don't pass it around. This reduces the number of parameters and makes calls to member functions simpler. No Functional Change. llvm-svn: 279700 --- llvm/lib/CodeGen/TailDuplication.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/TailDuplication.cpp') diff --git a/llvm/lib/CodeGen/TailDuplication.cpp b/llvm/lib/CodeGen/TailDuplication.cpp index 2b1fb127497..d603400597f 100644 --- a/llvm/lib/CodeGen/TailDuplication.cpp +++ b/llvm/lib/CodeGen/TailDuplication.cpp @@ -47,13 +47,12 @@ bool TailDuplicatePass::runOnMachineFunction(MachineFunction &MF) { if (skipFunction(*MF.getFunction())) return false; - auto MMI = getAnalysisIfAvailable(); auto MBPI = &getAnalysis(); Duplicator.initMF(MF, MMI, MBPI); bool MadeChange = false; - while (Duplicator.tailDuplicateBlocks(MF)) + while (Duplicator.tailDuplicateBlocks()) MadeChange = true; return MadeChange; -- cgit v1.2.3