mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189097 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user