Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Macros |Typedefs |Enumerations |Functions |Variables
Mips16HardFloat.cpp File Reference
#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)
 
staticFPReturnVariant whichFPReturnVariant (Type *T)
 
staticFPParamVariant whichFPParamVariantNeeded (Function &F)
 
staticbool needsFPStubFromParams (Function &F)
 
staticbool needsFPReturnHelper (Function &F)
 
staticbool needsFPReturnHelper (FunctionType &FT)
 
staticbool needsFPHelperFromSig (Function &F)
 
static std::string swapFPIntParams (FPParamVariant PV,Module *M,bool LE,bool ToFP)
 
static void assureFPCallStub (Function &F,Module *M,constMipsTargetMachine &TM)
 
staticbool isIntrinsicInline (Function *F)
 
staticbool fixupFPReturnAndCall (Function &F,Module *M,constMipsTargetMachine &TM)
 
static void createFPFnStub (Function *F,Module *M,FPParamVariant PV,constMipsTargetMachine &TM)
 
static void removeUseSoftFloat (Function &F)
 

Variables

constType::TypeID FloatTyID = Type::FloatTyID
 
constType::TypeID DoubleTyID = Type::DoubleTyID
 
staticconstchar *const IntrinsicInline []
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "mips16-hard-float"

Definition at line25 of fileMips16HardFloat.cpp.

Typedef Documentation

◆ TypeID

usingTypeID =Type::TypeID

Definition at line103 of fileMips16HardFloat.cpp.

Enumeration Type Documentation

◆ FPParamVariant

enumFPParamVariant
Enumerator
FSig 
FFSig 
FDSig 
DSig 
DDSig 
DFSig 
NoSig 

Definition at line97 of fileMips16HardFloat.cpp.

◆ FPReturnVariant

enumFPReturnVariant
Enumerator
FRet 
DRet 
CFRet 
CDRet 
NoFPRet 

Definition at line64 of fileMips16HardFloat.cpp.

Function Documentation

◆ assureFPCallStub()

static void assureFPCallStub(FunctionF,
ModuleM,
constMipsTargetMachineTM 
)
static

Definition at line257 of fileMips16HardFloat.cpp.

Referencesllvm::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(), andwhichFPReturnVariant().

Referenced byfixupFPReturnAndCall().

◆ createFPFnStub()

static void createFPFnStub(FunctionF,
ModuleM,
FPParamVariant PV,
constMipsTargetMachineTM 
)
static

Definition at line445 of fileMips16HardFloat.cpp.

Referencesllvm::Function::addFnAttr(),llvm::Function::Create(),llvm::BasicBlock::Create(),emitInlineAsm(),F,llvm::Function::getContext(),Name,llvm::GlobalObject::setSection(), andswapFPIntParams().

◆ emitInlineAsm()

static void emitInlineAsm(LLVMContextC,
BasicBlockBB,
StringRef AsmText 
)
static

Definition at line47 of fileMips16HardFloat.cpp.

Referencesllvm::InlineAsm::AD_ATT,llvm::CallingConv::C,llvm::CallInst::Create(),llvm::InlineAsm::get(), andllvm::Type::getVoidTy().

Referenced byassureFPCallStub(), andcreateFPFnStub().

◆ fixupFPReturnAndCall()

staticbool fixupFPReturnAndCall(FunctionF,
ModuleM,
constMipsTargetMachineTM 
)
static

Definition at line378 of fileMips16HardFloat.cpp.

ReferencesA,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(), andwhichFPReturnVariant().

◆ isIntrinsicInline()

staticbool isIntrinsicInline(FunctionF)
static

Definition at line371 of fileMips16HardFloat.cpp.

ReferencesF, andIntrinsicInline.

Referenced byfixupFPReturnAndCall().

◆ needsFPHelperFromSig()

staticbool needsFPHelperFromSig(FunctionF)
static

Definition at line181 of fileMips16HardFloat.cpp.

ReferencesF,needsFPReturnHelper(), andneedsFPStubFromParams().

Referenced byfixupFPReturnAndCall().

◆ needsFPReturnHelper()[1/2]

staticbool needsFPReturnHelper(FunctionF)
static

Definition at line171 of fileMips16HardFloat.cpp.

ReferencesF,NoFPRet, andwhichFPReturnVariant().

Referenced byfixupFPReturnAndCall(), andneedsFPHelperFromSig().

◆ needsFPReturnHelper()[2/2]

staticbool needsFPReturnHelper(FunctionTypeFT)
static

Definition at line176 of fileMips16HardFloat.cpp.

ReferencesNoFPRet, andwhichFPReturnVariant().

◆ needsFPStubFromParams()

staticbool needsFPStubFromParams(FunctionF)
static

Definition at line157 of fileMips16HardFloat.cpp.

Referencesllvm::Type::DoubleTyID,F,llvm::Type::FloatTyID, andllvm::Type::getTypeID().

Referenced byneedsFPHelperFromSig().

◆ removeUseSoftFloat()

static void removeUseSoftFloat(FunctionF)
static

Definition at line483 of fileMips16HardFloat.cpp.

Referencesllvm::errs(),F, andLLVM_DEBUG.

◆ swapFPIntParams()

static std::string swapFPIntParams(FPParamVariant PV,
ModuleM,
bool LE,
bool ToFP 
)
static

Definition at line187 of fileMips16HardFloat.cpp.

ReferencesDDSig,DFSig,DSig,FDSig,FFSig,FSig,MI, andNoSig.

Referenced byassureFPCallStub(), andcreateFPFnStub().

◆ whichFPParamVariantNeeded()

staticFPParamVariant whichFPParamVariantNeeded(FunctionF)
static

Definition at line107 of fileMips16HardFloat.cpp.

ReferencesDDSig,DFSig,DoubleTyID,DSig,F,FDSig,FFSig,FloatTyID,FSig,llvm_unreachable, andNoSig.

Referenced byassureFPCallStub().

◆ whichFPReturnVariant()

staticFPReturnVariant whichFPReturnVariant(TypeT)
static

Definition at line71 of fileMips16HardFloat.cpp.

ReferencesCDRet,CFRet,llvm::Type::DoubleTyID,DRet,llvm::Type::FloatTyID,FRet,NoFPRet, andllvm::Type::StructTyID.

Referenced byassureFPCallStub(),fixupFPReturnAndCall(), andneedsFPReturnHelper().

Variable Documentation

◆ DoubleTyID

constType::TypeID DoubleTyID = Type::DoubleTyID

Definition at line105 of fileMips16HardFloat.cpp.

Referenced bywhichFPParamVariantNeeded().

◆ FloatTyID

constType::TypeID FloatTyID = Type::FloatTyID

Definition at line104 of fileMips16HardFloat.cpp.

Referenced bywhichFPParamVariantNeeded().

◆ IntrinsicInline

constchar*const IntrinsicInline[]
static
Initial value:
= {
"fabs","fabsf",
"llvm.ceil.f32","llvm.ceil.f64",
"llvm.copysign.f32","llvm.copysign.f64",
"llvm.cos.f32","llvm.cos.f64",
"llvm.exp.f32","llvm.exp.f64",
"llvm.exp2.f32","llvm.exp2.f64",
"llvm.fabs.f32","llvm.fabs.f64",
"llvm.floor.f32","llvm.floor.f64",
"llvm.fma.f32","llvm.fma.f64",
"llvm.log.f32","llvm.log.f64",
"llvm.log10.f32","llvm.log10.f64",
"llvm.nearbyint.f32","llvm.nearbyint.f64",
"llvm.pow.f32","llvm.pow.f64",
"llvm.powi.f32.i32","llvm.powi.f64.i32",
"llvm.rint.f32","llvm.rint.f64",
"llvm.round.f32","llvm.round.f64",
"llvm.sin.f32","llvm.sin.f64",
"llvm.sqrt.f32","llvm.sqrt.f64",
"llvm.trunc.f32","llvm.trunc.f64",
}

Definition at line349 of fileMips16HardFloat.cpp.

Referenced byisIntrinsicInline().


Generated on Sun Jul 20 2025 15:03:25 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp