diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2019-12-06 12:17:32 -0800 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2019-12-06 12:17:32 -0800 |
commit | 2eb30fafa5f95d60353909c7c676431f2a29a745 (patch) | |
tree | 49b21bed699018506eb66c25f2e46c9bec0d84b1 /llvm/lib/Target/X86/X86OptimizeLEAs.cpp | |
parent | 779a180d964bf362f26f4c493db749cbbae550c5 (diff) | |
download | bcm5719-llvm-2eb30fafa5f95d60353909c7c676431f2a29a745.tar.gz bcm5719-llvm-2eb30fafa5f95d60353909c7c676431f2a29a745.zip |
Revert "[PGO][PGSO] Instrument the code gen / target passes."
This reverts commit 9a0b5e14075a1f42a72eedb66fd4fde7985d37ac.
This seems to break buildbots.
Diffstat (limited to 'llvm/lib/Target/X86/X86OptimizeLEAs.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86OptimizeLEAs.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/llvm/lib/Target/X86/X86OptimizeLEAs.cpp b/llvm/lib/Target/X86/X86OptimizeLEAs.cpp index 0c791b6674d..8fa553f5c84 100644 --- a/llvm/lib/Target/X86/X86OptimizeLEAs.cpp +++ b/llvm/lib/Target/X86/X86OptimizeLEAs.cpp @@ -25,8 +25,6 @@ #include "llvm/ADT/Hashing.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" -#include "llvm/Analysis/ProfileSummaryInfo.h" -#include "llvm/CodeGen/LazyMachineBlockFrequencyInfo.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" @@ -34,7 +32,6 @@ #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineOperand.h" #include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/CodeGen/MachineSizeOpts.h" #include "llvm/CodeGen/TargetOpcodes.h" #include "llvm/CodeGen/TargetRegisterInfo.h" #include "llvm/IR/DebugInfoMetadata.h" @@ -250,12 +247,6 @@ public: static char ID; - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.addRequired<ProfileSummaryInfoWrapperPass>(); - AU.addRequired<LazyMachineBlockFrequencyInfoPass>(); - MachineFunctionPass::getAnalysisUsage(AU); - } - private: using MemOpMap = DenseMap<MemOpKey, SmallVector<MachineInstr *, 16>>; @@ -690,11 +681,6 @@ bool X86OptimizeLEAPass::runOnMachineFunction(MachineFunction &MF) { MRI = &MF.getRegInfo(); TII = MF.getSubtarget<X86Subtarget>().getInstrInfo(); TRI = MF.getSubtarget<X86Subtarget>().getRegisterInfo(); - auto *PSI = - &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(); - auto *MBFI = (PSI && PSI->hasProfileSummary()) ? - &getAnalysis<LazyMachineBlockFrequencyInfoPass>().getBFI() : - nullptr; // Process all basic blocks. for (auto &MBB : MF) { @@ -713,9 +699,7 @@ bool X86OptimizeLEAPass::runOnMachineFunction(MachineFunction &MF) { // Remove redundant address calculations. Do it only for -Os/-Oz since only // a code size gain is expected from this part of the pass. - bool OptForSize = MF.getFunction().hasOptSize() || - llvm::shouldOptimizeForSize(&MBB, PSI, MBFI); - if (OptForSize) + if (MF.getFunction().hasOptSize()) Changed |= removeRedundantAddrCalc(LEAs); } |