LLVM API Documentation
#include "Mips16HardFloat.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <string>
Go to the source code of this file.
Namespaces | |
llvm | |
List of target independent CodeGen pass IDs. | |
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 void | inlineAsmOut (LLVMContext &C, StringRef AsmString, BasicBlock *BB) |
static FPReturnVariant | whichFPReturnVariant (Type *T) |
static FPParamVariant | whichFPParamVariantNeeded (Function &F) |
static bool | needsFPStubFromParams (Function &F) |
static bool | needsFPReturnHelper (Function &F) |
static bool | needsFPHelperFromSig (Function &F) |
static void | swapFPIntParams (FPParamVariant PV, Module *M, InlineAsmHelper &IAH, bool LE, bool ToFP) |
static void | assureFPCallStub (Function &F, Module *M, const MipsSubtarget &Subtarget) |
static bool | isIntrinsicInline (Function *F) |
static bool | fixupFPReturnAndCall (Function &F, Module *M, const MipsSubtarget &Subtarget) |
static void | createFPFnStub (Function *F, Module *M, FPParamVariant PV, const MipsSubtarget &Subtarget) |
static void | removeUseSoftFloat (Function &F) |
Variables | |
const Type::TypeID | FloatTyID = Type::FloatTyID |
const Type::TypeID | DoubleTyID = Type::DoubleTyID |
static const char * | IntrinsicInline [] |
#define DEBUG_TYPE "mips16-hard-float" |
Definition at line 14 of file Mips16HardFloat.cpp.
typedef Type::TypeID TypeID |
Definition at line 96 of file Mips16HardFloat.cpp.
enum FPParamVariant |
Enumerator | |
---|---|
FSig | |
FFSig | |
FDSig | |
DSig | |
DDSig | |
DFSig | |
NoSig |
Definition at line 89 of file Mips16HardFloat.cpp.
enum FPReturnVariant |
Enumerator | |
---|---|
FRet | |
DRet | |
CFRet | |
CDRet | |
NoFPRet |
Definition at line 56 of file Mips16HardFloat.cpp.
|
static |
Definition at line 242 of file Mips16HardFloat.cpp.
References llvm::Function::addFnAttr(), CDRet, CFRet, DRet, FRet, llvm::Module::getContext(), llvm::Module::getFunction(), llvm::Function::getFunctionType(), llvm::Value::getName(), llvm::MipsSubtarget::getRelocationModel(), llvm::Function::getReturnType(), llvm::GlobalValue::isDeclaration(), llvm::MipsSubtarget::isLittle(), llvm::Attribute::Naked, NoFPRet, llvm::Attribute::NoInline, llvm::Attribute::NoUnwind, llvm::Reloc::PIC_, llvm::GlobalValue::setSection(), swapFPIntParams(), whichFPParamVariantNeeded(), and whichFPReturnVariant().
Referenced by fixupFPReturnAndCall().
|
static |
Definition at line 417 of file Mips16HardFloat.cpp.
References llvm::Function::addFnAttr(), llvm::Function::getContext(), llvm::Module::getContext(), llvm::Function::getFunctionType(), llvm::Value::getName(), llvm::MipsSubtarget::getRelocationModel(), llvm::MipsSubtarget::isLittle(), llvm::Attribute::Naked, llvm::Attribute::NoInline, llvm::Attribute::NoUnwind, llvm::Reloc::PIC_, llvm::GlobalValue::setSection(), and swapFPIntParams().
Referenced by llvm::Mips16HardFloat::runOnModule().
|
static |
Definition at line 360 of file Mips16HardFloat.cpp.
References llvm::ARM_PROC::A, llvm::AttributeSet::addAttribute(), assureFPCallStub(), llvm::BasicBlock::begin(), llvm::Function::begin(), llvm::BasicBlock::end(), llvm::Function::end(), llvm::Module::getContext(), llvm::Module::getOrInsertFunction(), llvm::MipsSubtarget::getRelocationModel(), llvm::Value::getType(), I, isIntrinsicInline(), needsFPHelperFromSig(), NoFPRet, llvm::Reloc::PIC_, and whichFPReturnVariant().
Referenced by llvm::Mips16HardFloat::runOnModule().
|
static |
Definition at line 23 of file Mips16HardFloat.cpp.
References llvm::InlineAsm::AD_ATT, llvm::InlineAsm::get(), and llvm::FunctionType::get().
Definition at line 350 of file Mips16HardFloat.cpp.
References llvm::array_endof(), and llvm::Value::getName().
Referenced by fixupFPReturnAndCall().
Definition at line 170 of file Mips16HardFloat.cpp.
References needsFPReturnHelper(), and needsFPStubFromParams().
Referenced by fixupFPReturnAndCall().
Definition at line 165 of file Mips16HardFloat.cpp.
References llvm::Function::getReturnType(), NoFPRet, and whichFPReturnVariant().
Referenced by needsFPHelperFromSig().
Definition at line 151 of file Mips16HardFloat.cpp.
References llvm::Function::arg_size(), DoubleTyID, FloatTyID, llvm::Function::getFunctionType(), llvm::FunctionType::getParamType(), and llvm::Type::getTypeID().
Referenced by needsFPHelperFromSig().
|
static |
Definition at line 458 of file Mips16HardFloat.cpp.
References llvm::ARM_PROC::A, llvm::AttributeSet::addAttribute(), llvm::Function::addAttributes(), DEBUG, llvm::errs(), llvm::Function::getContext(), llvm::Function::hasFnAttribute(), and llvm::Function::removeAttributes().
Referenced by llvm::Mips16HardFloat::runOnModule().
|
static |
Definition at line 180 of file Mips16HardFloat.cpp.
References DDSig, DFSig, DSig, FDSig, FFSig, FSig, llvm::A64CC::MI, and NoSig.
Referenced by assureFPCallStub(), and createFPFnStub().
|
static |
Definition at line 100 of file Mips16HardFloat.cpp.
References llvm::Function::arg_size(), DDSig, DFSig, DSig, FDSig, FFSig, FSig, llvm::Function::getFunctionType(), llvm::FunctionType::getParamType(), llvm::Type::getTypeID(), llvm_unreachable, and NoSig.
Referenced by assureFPCallStub(), and llvm::Mips16HardFloat::runOnModule().
|
static |
Definition at line 63 of file Mips16HardFloat.cpp.
References CDRet, CFRet, DoubleTyID, DRet, FloatTyID, FRet, llvm::Type::getContainedType(), llvm::Type::getStructNumElements(), llvm::Type::getTypeID(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), and NoFPRet.
Referenced by assureFPCallStub(), fixupFPReturnAndCall(), and needsFPReturnHelper().
const Type::TypeID DoubleTyID = Type::DoubleTyID |
Definition at line 98 of file Mips16HardFloat.cpp.
Referenced by needsFPStubFromParams(), and whichFPReturnVariant().
const Type::TypeID FloatTyID = Type::FloatTyID |
Definition at line 97 of file Mips16HardFloat.cpp.
Referenced by needsFPStubFromParams(), and whichFPReturnVariant().
|
static |
Definition at line 327 of file Mips16HardFloat.cpp.