LLVM
8.0.1
|
#include "MipsTargetMachine.h"
#include "llvm/CodeGen/TargetPassConfig.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 | |
using | TypeID = Type::TypeID |
Enumerations | |
enum | FPReturnVariant { FRet, DRet, CFRet, CDRet, NoFPRet } |
enum | FPParamVariant { FSig, FFSig, FDSig, DSig, DDSig, DFSig, NoSig } |
Functions | |
static void | EmitInlineAsm (LLVMContext &C, BasicBlock *BB, StringRef AsmText) |
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 25 of file Mips16HardFloat.cpp.
using TypeID = Type::TypeID |
Definition at line 103 of file Mips16HardFloat.cpp.
enum FPParamVariant |
Enumerator | |
---|---|
FSig | |
FFSig | |
FDSig | |
DSig | |
DDSig | |
DFSig | |
NoSig |
Definition at line 97 of file Mips16HardFloat.cpp.
enum FPReturnVariant |
Enumerator | |
---|---|
FRet | |
DRet | |
CFRet | |
CDRet | |
NoFPRet |
Definition at line 64 of file Mips16HardFloat.cpp.
|
static |
Definition at line 257 of file Mips16HardFloat.cpp.
References llvm::Function::addFnAttr(), CDRet, CFRet, Context, llvm::BasicBlock::Create(), llvm::Function::Create(), DRet, EmitInlineAsm(), 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, llvm::Attribute::Naked, Name, NoFPRet, llvm::Attribute::NoInline, llvm::Attribute::NoUnwind, llvm::GlobalObject::setSection(), swapFPIntParams(), whichFPParamVariantNeeded(), and whichFPReturnVariant().
Referenced by fixupFPReturnAndCall().
|
static |
Definition at line 447 of file Mips16HardFloat.cpp.
References llvm::Function::addFnAttr(), Context, llvm::BasicBlock::Create(), llvm::Function::Create(), EmitInlineAsm(), llvm::Function::getContext(), llvm::Module::getContext(), llvm::Function::getFunctionType(), llvm::Value::getName(), llvm::GlobalValue::InternalLinkage, llvm::MipsTargetMachine::isLittleEndian(), llvm::TargetMachine::isPositionIndependent(), llvm::AArch64CC::LE, llvm::Attribute::Naked, Name, llvm::Attribute::NoInline, llvm::Attribute::NoUnwind, llvm::GlobalObject::setSection(), and swapFPIntParams().
Referenced by removeUseSoftFloat().
|
static |
Definition at line 47 of file Mips16HardFloat.cpp.
References llvm::InlineAsm::AD_ATT, llvm::CallInst::Create(), llvm::InlineAsm::get(), llvm::FunctionType::get(), and llvm::Type::getVoidTy().
Referenced by assureFPCallStub(), createFPFnStub(), and llvm::AsmPrinter::emitDwarfAbbrevs().
|
static |
Definition at line 378 of file Mips16HardFloat.cpp.
References llvm::AttributeList::addAttribute(), assureFPCallStub(), C, llvm::CallInst::Create(), llvm::AttributeList::FunctionIndex, llvm::Module::getContext(), llvm::Module::getOrInsertFunction(), llvm::Value::getType(), llvm::Type::getVoidTy(), I, isIntrinsicInline(), llvm::TargetMachine::isPositionIndependent(), Modified, Name, needsFPHelperFromSig(), needsFPReturnHelper(), NoFPRet, llvm::Attribute::NoInline, llvm::Attribute::ReadNone, and whichFPReturnVariant().
Referenced by removeUseSoftFloat().
Definition at line 371 of file Mips16HardFloat.cpp.
References llvm::sys::path::begin(), llvm::sys::path::end(), and llvm::Value::getName().
Referenced by fixupFPReturnAndCall().
Definition at line 181 of file Mips16HardFloat.cpp.
References needsFPReturnHelper(), and needsFPStubFromParams().
Referenced by fixupFPReturnAndCall().
Definition at line 171 of file Mips16HardFloat.cpp.
References llvm::Function::getReturnType(), NoFPRet, and whichFPReturnVariant().
Referenced by fixupFPReturnAndCall(), and needsFPHelperFromSig().
|
static |
Definition at line 176 of file Mips16HardFloat.cpp.
References llvm::FunctionType::getReturnType(), NoFPRet, and whichFPReturnVariant().
Definition at line 157 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 485 of file Mips16HardFloat.cpp.
References llvm::AttrBuilder::addAttribute(), llvm::Function::addAttributes(), B, llvm::Module::begin(), createFPFnStub(), E, llvm::Module::end(), llvm::errs(), F(), fixupFPReturnAndCall(), llvm::AttributeList::FunctionIndex, llvm::Function::hasFnAttribute(), LLVM_DEBUG, Modified, NoSig, llvm::Function::removeAttributes(), llvm::SystemZISD::TM, and whichFPParamVariantNeeded().
|
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 107 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(), and removeUseSoftFloat().
|
static |
Definition at line 71 of file Mips16HardFloat.cpp.
References CDRet, CFRet, llvm::Type::DoubleTyID, DRet, llvm::Type::FloatTyID, FRet, llvm::StructType::getElementType(), llvm::StructType::getNumElements(), llvm::Type::getTypeID(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), NoFPRet, llvm::ARM_MB::ST, llvm::Type::StructTyID, and T.
Referenced by assureFPCallStub(), fixupFPReturnAndCall(), and needsFPReturnHelper().
const Type::TypeID DoubleTyID = Type::DoubleTyID |
Definition at line 105 of file Mips16HardFloat.cpp.
Referenced by llvm::orc::OrcMCJITReplacement::runFunction(), and whichFPParamVariantNeeded().
const Type::TypeID FloatTyID = Type::FloatTyID |
Definition at line 104 of file Mips16HardFloat.cpp.
Referenced by llvm::orc::OrcMCJITReplacement::runFunction(), and whichFPParamVariantNeeded().
Definition at line 349 of file Mips16HardFloat.cpp.