From 3e85c48d366360b7a3bbe515db4e21e29ac7d9fc Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Tue, 28 Jul 2015 16:48:37 +0000 Subject: [PATCH] MIR Parser: Remove redundant parameters. NFC. This commit removes the redundant parameters from the two methods 'initializeRegisterInfo' and 'initializeFrameInfo'. The removed parameters are redundant as we are already passing in the 'MachineFunction' to those methods, and those parameters can be derived from the machine function parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243445 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MIRParser/MIRParser.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/CodeGen/MIRParser/MIRParser.cpp b/lib/CodeGen/MIRParser/MIRParser.cpp index f733d633357..7f2d4111023 100644 --- a/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/lib/CodeGen/MIRParser/MIRParser.cpp @@ -103,11 +103,11 @@ public: const yaml::MachineBasicBlock &YamlMBB, const PerFunctionMIParsingState &PFS); - bool initializeRegisterInfo(MachineFunction &MF, MachineRegisterInfo &RegInfo, + bool initializeRegisterInfo(MachineFunction &MF, const yaml::MachineFunction &YamlMF, PerFunctionMIParsingState &PFS); - bool initializeFrameInfo(MachineFunction &MF, MachineFrameInfo &MFI, + bool initializeFrameInfo(MachineFunction &MF, const yaml::MachineFunction &YamlMF, PerFunctionMIParsingState &PFS); @@ -276,9 +276,9 @@ bool MIRParserImpl::initializeMachineFunction(MachineFunction &MF) { MF.setExposesReturnsTwice(YamlMF.ExposesReturnsTwice); MF.setHasInlineAsm(YamlMF.HasInlineAsm); PerFunctionMIParsingState PFS; - if (initializeRegisterInfo(MF, MF.getRegInfo(), YamlMF, PFS)) + if (initializeRegisterInfo(MF, YamlMF, PFS)) return true; - if (initializeFrameInfo(MF, *MF.getFrameInfo(), YamlMF, PFS)) + if (initializeFrameInfo(MF, YamlMF, PFS)) return true; if (!YamlMF.Constants.empty()) { auto *ConstantPool = MF.getConstantPool(); @@ -377,9 +377,9 @@ bool MIRParserImpl::initializeMachineBasicBlock( } bool MIRParserImpl::initializeRegisterInfo(MachineFunction &MF, - MachineRegisterInfo &RegInfo, const yaml::MachineFunction &YamlMF, PerFunctionMIParsingState &PFS) { + MachineRegisterInfo &RegInfo = MF.getRegInfo(); assert(RegInfo.isSSA()); if (!YamlMF.IsSSA) RegInfo.leaveSSA(); @@ -428,9 +428,9 @@ bool MIRParserImpl::initializeRegisterInfo(MachineFunction &MF, } bool MIRParserImpl::initializeFrameInfo(MachineFunction &MF, - MachineFrameInfo &MFI, const yaml::MachineFunction &YamlMF, PerFunctionMIParsingState &PFS) { + MachineFrameInfo &MFI = *MF.getFrameInfo(); const Function &F = *MF.getFunction(); const yaml::MachineFrameInfo &YamlMFI = YamlMF.FrameInfo; MFI.setFrameAddressIsTaken(YamlMFI.IsFrameAddressTaken); -- 2.34.1