diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-06-11 22:21:44 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-06-11 22:21:44 +0000 |
commit | 5c50a16ee01911ae23cbc7f1caf6c909b8708ec4 (patch) | |
tree | 8f925bda9819660817b77742f73083b7988535f0 /llvm/lib/Target/Mips/MipsTargetMachine.cpp | |
parent | 3bc8e7190909b8f5962e95360bc2cc929b50cf2f (diff) | |
download | bcm5719-llvm-5c50a16ee01911ae23cbc7f1caf6c909b8708ec4.tar.gz bcm5719-llvm-5c50a16ee01911ae23cbc7f1caf6c909b8708ec4.zip |
[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.
llvm-svn: 183802
Diffstat (limited to 'llvm/lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsTargetMachine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsTargetMachine.cpp b/llvm/lib/Target/Mips/MipsTargetMachine.cpp index 89407351a07..9af2f1b201d 100644 --- a/llvm/lib/Target/Mips/MipsTargetMachine.cpp +++ b/llvm/lib/Target/Mips/MipsTargetMachine.cpp @@ -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. |