[mips] Add an IR transformation pass that optimizes calls to sqrt.

The pass emits a call to sqrt that has attribute "read-none". This call will be
converted to an ISD::FSQRT node during DAG construction, which will turn into
a mips native sqrt instruction.
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183802 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka
2013-06-11 22:21:44 +00:00
parent a11c3e2501
commit 45137f954f
4 changed files with 209 additions and 1 deletions

View File

@ -160,6 +160,7 @@ void MipsPassConfig::addIRPasses() {
addPass(createMipsOs16(getMipsTargetMachine()));
if (getMipsSubtarget().inMips16HardFloat())
addPass(createMips16HardFloat(getMipsTargetMachine()));
addPass(createMipsOptimizeMathLibCalls(getMipsTargetMachine()));
}
// Install an instruction selector pass using
// the ISelDag to gen Mips code.