aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/Mips/MipsTargetMachine.cpp
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-23 10:27:02 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-23 10:27:02 +0000
commit37cd6cfba2e92fa89fbc4e8653edf1bb3229ba0d (patch)
treee6823002829472937c12857c88104b02b2d3b7a3 /llvm/lib/Target/Mips/MipsTargetMachine.cpp
parent1f1b2756a467b8ab835109c4aae6a4e84cbd64c3 (diff)
downloadllvm-37cd6cfba2e92fa89fbc4e8653edf1bb3229ba0d.zip
llvm-37cd6cfba2e92fa89fbc4e8653edf1bb3229ba0d.tar.gz
llvm-37cd6cfba2e92fa89fbc4e8653edf1bb3229ba0d.tar.bz2
Turn MipsOptimizeMathLibCalls into a target-independent scalar transform
...so that it can be used for z too. Most of the code is the same. The only real change is to use TargetTransformInfo to test when a sqrt instruction is available. The pass is opt-in because at the moment it only handles sqrt. llvm-svn: 189097
Diffstat (limited to 'llvm/lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/Mips/MipsTargetMachine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/MipsTargetMachine.cpp b/llvm/lib/Target/Mips/MipsTargetMachine.cpp
index ced6a09..f25afe3 100644
--- a/llvm/lib/Target/Mips/MipsTargetMachine.cpp
+++ b/llvm/lib/Target/Mips/MipsTargetMachine.cpp
@@ -32,6 +32,7 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/TargetRegistry.h"
+#include "llvm/Transforms/Scalar.h"
using namespace llvm;
@@ -160,7 +161,7 @@ void MipsPassConfig::addIRPasses() {
addPass(createMipsOs16(getMipsTargetMachine()));
if (getMipsSubtarget().inMips16HardFloat())
addPass(createMips16HardFloat(getMipsTargetMachine()));
- addPass(createMipsOptimizeMathLibCalls(getMipsTargetMachine()));
+ addPass(createPartiallyInlineLibCallsPass());
}
// Install an instruction selector pass using
// the ISelDag to gen Mips code.