LLVM 20.0.0git
|
#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/ModRef.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, llvm::Function::Create(), llvm::BasicBlock::Create(), DRet, emitInlineAsm(), F, FRet, llvm::Function::getReturnType(), llvm::GlobalValue::isDeclaration(), Name, NoFPRet, llvm::GlobalObject::setSection(), swapFPIntParams(), whichFPParamVariantNeeded(), and whichFPReturnVariant().
Referenced by fixupFPReturnAndCall().
|
static |
Definition at line 445 of file Mips16HardFloat.cpp.
References llvm::Function::addFnAttr(), llvm::Function::Create(), llvm::BasicBlock::Create(), emitInlineAsm(), F, llvm::Function::getContext(), Name, llvm::GlobalObject::setSection(), and swapFPIntParams().
|
static |
Definition at line 47 of file Mips16HardFloat.cpp.
References llvm::InlineAsm::AD_ATT, llvm::CallingConv::C, llvm::CallInst::Create(), llvm::InlineAsm::get(), and llvm::Type::getVoidTy().
Referenced by assureFPCallStub(), and createFPFnStub().
|
static |
Definition at line 378 of file Mips16HardFloat.cpp.
References A, assureFPCallStub(), llvm::CallingConv::C, llvm::CallInst::Create(), F, llvm::Value::getType(), llvm::Type::getVoidTy(), llvm::Attribute::getWithMemoryEffects(), I, isIntrinsicInline(), Modified, Name, needsFPHelperFromSig(), needsFPReturnHelper(), NoFPRet, llvm::MemoryEffectsBase< LocationEnum >::none(), and whichFPReturnVariant().
Definition at line 371 of file Mips16HardFloat.cpp.
References F, and IntrinsicInline.
Referenced by fixupFPReturnAndCall().
Definition at line 181 of file Mips16HardFloat.cpp.
References F, needsFPReturnHelper(), and needsFPStubFromParams().
Referenced by fixupFPReturnAndCall().
Definition at line 171 of file Mips16HardFloat.cpp.
References F, NoFPRet, and whichFPReturnVariant().
Referenced by fixupFPReturnAndCall(), and needsFPHelperFromSig().
|
static |
Definition at line 176 of file Mips16HardFloat.cpp.
References NoFPRet, and whichFPReturnVariant().
Definition at line 157 of file Mips16HardFloat.cpp.
References llvm::Type::DoubleTyID, F, llvm::Type::FloatTyID, and llvm::Type::getTypeID().
Referenced by needsFPHelperFromSig().
|
static |
Definition at line 483 of file Mips16HardFloat.cpp.
References llvm::errs(), F, and LLVM_DEBUG.
|
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 DDSig, DFSig, DoubleTyID, DSig, F, FDSig, FFSig, FloatTyID, FSig, llvm_unreachable, and NoSig.
Referenced by assureFPCallStub().
|
static |
Definition at line 71 of file Mips16HardFloat.cpp.
References CDRet, CFRet, llvm::Type::DoubleTyID, DRet, llvm::Type::FloatTyID, FRet, NoFPRet, and llvm::Type::StructTyID.
Referenced by assureFPCallStub(), fixupFPReturnAndCall(), and needsFPReturnHelper().
const Type::TypeID DoubleTyID = Type::DoubleTyID |
Definition at line 105 of file Mips16HardFloat.cpp.
Referenced by whichFPParamVariantNeeded().
const Type::TypeID FloatTyID = Type::FloatTyID |
Definition at line 104 of file Mips16HardFloat.cpp.
Referenced by whichFPParamVariantNeeded().
Definition at line 349 of file Mips16HardFloat.cpp.
Referenced by isIntrinsicInline().