From 807ca72e665ef48a47950d7b4d45fd28ec92ad99 Mon Sep 17 00:00:00 2001 From: Andrew Ng Date: Fri, 5 May 2017 09:21:35 +0000 Subject: [PATCH] [X86] Remove unused code from X86 optimize LEAs. NFC. This patch removes unused code which is no longer required because of changes to the DIExpression::prepend function. llvm-svn: 302219 --- llvm/lib/Target/X86/X86OptimizeLEAs.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/llvm/lib/Target/X86/X86OptimizeLEAs.cpp b/llvm/lib/Target/X86/X86OptimizeLEAs.cpp index 7be0a7f..aabbf67 100644 --- a/llvm/lib/Target/X86/X86OptimizeLEAs.cpp +++ b/llvm/lib/Target/X86/X86OptimizeLEAs.cpp @@ -223,8 +223,6 @@ public: StringRef getPassName() const override { return "X86 LEA Optimize"; } - bool doInitialization(Module &M) override; - /// \brief Loop over all of the basic blocks, replacing address /// calculations in load and store instructions, if it's already /// been calculated by LEA. Also, remove redundant LEAs. @@ -280,7 +278,6 @@ private: MachineRegisterInfo *MRI; const X86InstrInfo *TII; const X86RegisterInfo *TRI; - Module *TheModule; static char ID; }; @@ -649,11 +646,6 @@ bool OptimizeLEAPass::removeRedundantLEAs(MemOpMap &LEAs) { return Changed; } -bool OptimizeLEAPass::doInitialization(Module &M) { - TheModule = &M; - return false; -} - bool OptimizeLEAPass::runOnMachineFunction(MachineFunction &MF) { bool Changed = false; -- 2.7.4