[PATCH] D26036: [mips] Always run the MipsOptimizePICCall pass.
Vasileios Kalintiris via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 09:12:42 PDT 2016
vkalintiris created this revision.
vkalintiris added a reviewer: sdardis.
vkalintiris added a subscriber: llvm-commits.
Remove this pass from addMachineSSAOptimization() and register it unconditionally in through addPreRegAlloc(). This pass is required for generating correct PIC calls.
https://reviews.llvm.org/D26036
Files:
lib/Target/Mips/MipsTargetMachine.cpp
Index: lib/Target/Mips/MipsTargetMachine.cpp
===================================================================
--- lib/Target/Mips/MipsTargetMachine.cpp
+++ lib/Target/Mips/MipsTargetMachine.cpp
@@ -208,7 +208,6 @@
void addIRPasses() override;
bool addInstSelector() override;
- void addMachineSSAOptimization() override;
void addPreEmitPass() override;
void addPreRegAlloc() override;
@@ -237,14 +236,8 @@
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() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26036.76053.patch
Type: text/x-patch
Size: 907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161027/c0d28dde/attachment.bin>
More information about the llvm-commits
mailing list