[llvm] r285814 - [mips] Always run the MipsOptimizePICCall pass.

Vasileios Kalintiris via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 08:11:27 PDT 2016


Author: vkalintiris
Date: Wed Nov  2 10:11:27 2016
New Revision: 285814

URL: http://llvm.org/viewvc/llvm-project?rev=285814&view=rev
Log:
[mips] Always run the MipsOptimizePICCall pass.

Summary:
Remove this pass from addMachineSSAOptimization() and register it unconditionally in through addPreRegAlloc(). This pass is required for generating correct PIC calls.

Reviewers: sdardis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D26036

Modified:
    llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp?rev=285814&r1=285813&r2=285814&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp Wed Nov  2 10:11:27 2016
@@ -208,7 +208,6 @@ public:
 
   void addIRPasses() override;
   bool addInstSelector() override;
-  void addMachineSSAOptimization() override;
   void addPreEmitPass() override;
 
   void addPreRegAlloc() override;
@@ -237,14 +236,8 @@ bool MipsPassConfig::addInstSelector() {
   return false;
 }
 
-void MipsPassConfig::addMachineSSAOptimization() {
-  addPass(createMipsOptimizePICCallPass(getMipsTargetMachine()));
-  TargetPassConfig::addMachineSSAOptimization();
-}
-
 void MipsPassConfig::addPreRegAlloc() {
-  if (getOptLevel() == CodeGenOpt::None)
-    addPass(createMipsOptimizePICCallPass(getMipsTargetMachine()));
+  addPass(createMipsOptimizePICCallPass(getMipsTargetMachine()));
 }
 
 TargetIRAnalysis MipsTargetMachine::getTargetIRAnalysis() {




More information about the llvm-commits mailing list