|
LLVM
4.0.0
|
#include "MipsTargetMachine.h"#include "llvm/IR/Module.h"#include "llvm/IR/Value.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include <algorithm>#include <string>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "mips16-hard-float" |
Typedefs | |
| typedef Type::TypeID | TypeID |
Enumerations | |
| enum | FPReturnVariant { FRet, DRet, CFRet, CDRet, NoFPRet } |
| enum | FPParamVariant { FSig, FFSig, FDSig, DSig, DDSig, DFSig, NoSig } |
Functions | |
| static FPReturnVariant | whichFPReturnVariant (Type *T) |
| static FPParamVariant | whichFPParamVariantNeeded (Function &F) |
| static bool | needsFPStubFromParams (Function &F) |
| static bool | needsFPReturnHelper (Function &F) |
| static bool | needsFPReturnHelper (FunctionType &FT) |
| static bool | needsFPHelperFromSig (Function &F) |
| static std::string | swapFPIntParams (FPParamVariant PV, Module *M, bool LE, bool ToFP) |
| static void | assureFPCallStub (Function &F, Module *M, const MipsTargetMachine &TM) |
| static bool | isIntrinsicInline (Function *F) |
| static bool | fixupFPReturnAndCall (Function &F, Module *M, const MipsTargetMachine &TM) |
| static void | createFPFnStub (Function *F, Module *M, FPParamVariant PV, const MipsTargetMachine &TM) |
| static void | removeUseSoftFloat (Function &F) |
Variables | |
| const Type::TypeID | FloatTyID = Type::FloatTyID |
| const Type::TypeID | DoubleTyID = Type::DoubleTyID |
| static const char *const | IntrinsicInline [] |
| #define DEBUG_TYPE "mips16-hard-float" |
Definition at line 24 of file Mips16HardFloat.cpp.
| typedef Type::TypeID TypeID |
Definition at line 100 of file Mips16HardFloat.cpp.
| enum FPParamVariant |
| Enumerator | |
|---|---|
| FSig | |
| FFSig | |
| FDSig | |
| DSig | |
| DDSig | |
| DFSig | |
| NoSig | |
Definition at line 93 of file Mips16HardFloat.cpp.
| enum FPReturnVariant |
| Enumerator | |
|---|---|
| FRet | |
| DRet | |
| CFRet | |
| CDRet | |
| NoFPRet | |
Definition at line 60 of file Mips16HardFloat.cpp.
|
static |
Definition at line 259 of file Mips16HardFloat.cpp.
References llvm::Function::addFnAttr(), CDRet, CFRet, Context, llvm::BasicBlock::Create(), llvm::Function::Create(), DRet, FRet, llvm::Module::getContext(), llvm::Module::getFunction(), llvm::Function::getFunctionType(), llvm::Value::getName(), llvm::Function::getReturnType(), llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::isDeclaration(), llvm::MipsTargetMachine::isLittleEndian(), llvm::TargetMachine::isPositionIndependent(), llvm::AArch64CC::LE, NoFPRet, AMDGPU::PT_NOTE::SectionName, llvm::GlobalObject::setSection(), swapFPIntParams(), whichFPParamVariantNeeded(), and whichFPReturnVariant().
Referenced by fixupFPReturnAndCall().
|
static |
Definition at line 452 of file Mips16HardFloat.cpp.
References llvm::Function::addFnAttr(), Context, llvm::BasicBlock::Create(), llvm::Function::Create(), llvm::Function::getContext(), llvm::Module::getContext(), llvm::Function::getFunctionType(), llvm::Value::getName(), llvm::GlobalValue::InternalLinkage, llvm::MipsTargetMachine::isLittleEndian(), llvm::TargetMachine::isPositionIndependent(), llvm::AArch64CC::LE, AMDGPU::PT_NOTE::SectionName, llvm::GlobalObject::setSection(), and swapFPIntParams().
|
static |
Definition at line 383 of file Mips16HardFloat.cpp.
References A, llvm::AttributeSet::addAttribute(), assureFPCallStub(), C, llvm::CallInst::Create(), llvm::AttributeSet::FunctionIndex, llvm::Module::getContext(), llvm::Module::getOrInsertFunction(), llvm::Value::getType(), llvm::Type::getVoidTy(), I, isIntrinsicInline(), llvm::TargetMachine::isPositionIndependent(), needsFPHelperFromSig(), needsFPReturnHelper(), NoFPRet, and whichFPReturnVariant().
Definition at line 375 of file Mips16HardFloat.cpp.
References llvm::sys::path::begin(), llvm::sys::path::end(), llvm::Value::getName(), and IntrinsicInline.
Referenced by fixupFPReturnAndCall().
Definition at line 179 of file Mips16HardFloat.cpp.
References needsFPReturnHelper(), and needsFPStubFromParams().
Referenced by fixupFPReturnAndCall().
Definition at line 169 of file Mips16HardFloat.cpp.
References llvm::Function::getReturnType(), NoFPRet, and whichFPReturnVariant().
Referenced by fixupFPReturnAndCall(), and needsFPHelperFromSig().
|
static |
Definition at line 174 of file Mips16HardFloat.cpp.
References llvm::FunctionType::getReturnType(), NoFPRet, and whichFPReturnVariant().
Definition at line 155 of file Mips16HardFloat.cpp.
References llvm::Function::arg_size(), llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::Function::getFunctionType(), llvm::FunctionType::getParamType(), and llvm::Type::getTypeID().
Referenced by needsFPHelperFromSig().
|
static |
Definition at line 492 of file Mips16HardFloat.cpp.
References A, llvm::AttributeSet::addAttribute(), llvm::Function::addAttributes(), DEBUG, llvm::errs(), llvm::AttributeSet::FunctionIndex, llvm::Function::getContext(), llvm::Function::hasFnAttribute(), and llvm::Function::removeAttributes().
|
static |
Definition at line 187 of file Mips16HardFloat.cpp.
References DDSig, DFSig, DSig, FDSig, FFSig, FSig, MI, and NoSig.
Referenced by assureFPCallStub(), and createFPFnStub().
|
static |
Definition at line 104 of file Mips16HardFloat.cpp.
References llvm::Function::arg_size(), DDSig, DFSig, DoubleTyID, DSig, FDSig, FFSig, FloatTyID, FSig, llvm::Function::getFunctionType(), llvm::FunctionType::getParamType(), llvm::Type::getTypeID(), llvm_unreachable, and NoSig.
Referenced by assureFPCallStub().
|
static |
Definition at line 67 of file Mips16HardFloat.cpp.
References CDRet, CFRet, llvm::Type::DoubleTyID, DRet, llvm::Type::FloatTyID, FRet, llvm::Type::getContainedType(), llvm::Type::getStructNumElements(), llvm::Type::getTypeID(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), NoFPRet, and llvm::Type::StructTyID.
Referenced by assureFPCallStub(), fixupFPReturnAndCall(), and needsFPReturnHelper().
| const Type::TypeID DoubleTyID = Type::DoubleTyID |
Definition at line 102 of file Mips16HardFloat.cpp.
Referenced by whichFPParamVariantNeeded().
| const Type::TypeID FloatTyID = Type::FloatTyID |
Definition at line 101 of file Mips16HardFloat.cpp.
Referenced by whichFPParamVariantNeeded().
Definition at line 353 of file Mips16HardFloat.cpp.
Referenced by isIntrinsicInline().
1.8.6