|
LLVM 24.0.0git
|
#include "Mips.h"#include "MipsTargetMachine.h"#include "llvm/CodeGen/TargetPassConfig.h"#include "llvm/IR/Analysis.h"#include "llvm/IR/Module.h"#include "llvm/IR/PassManager.h"#include "llvm/IR/Value.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ModRef.h"#include "llvm/Support/raw_ostream.h"#include <string>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "mips-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 bool | runHardFloatOnModule (Module &M, const MipsTargetMachine &TM) |
Variables | |
| const Type::TypeID | FloatTyID = Type::FloatTyID |
| const Type::TypeID | DoubleTyID = Type::DoubleTyID |
| static const char *const | IntrinsicInline [] |
| #define DEBUG_TYPE "mips-mips16-hard-float" |
Definition at line 27 of file Mips16HardFloat.cpp.
| using TypeID = Type::TypeID |
Definition at line 106 of file Mips16HardFloat.cpp.
| enum FPParamVariant |
| Enumerator | |
|---|---|
| FSig | |
| FFSig | |
| FDSig | |
| DSig | |
| DDSig | |
| DFSig | |
| NoSig | |
Definition at line 100 of file Mips16HardFloat.cpp.
| enum FPReturnVariant |
| Enumerator | |
|---|---|
| FRet | |
| DRet | |
| CFRet | |
| CDRet | |
| NoFPRet | |
Definition at line 67 of file Mips16HardFloat.cpp.
|
static |
Definition at line 260 of file Mips16HardFloat.cpp.
References llvm::Function::addFnAttr(), CDRet, CFRet, llvm::BasicBlock::Create(), llvm::Function::Create(), DRet, emitInlineAsm(), F, FRet, llvm::Function::getFunction(), llvm::Function::getReturnType(), llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::isDeclaration(), llvm::MipsTargetMachine::isLittleEndian(), llvm::TargetMachine::isPositionIndependent(), NoFPRet, llvm::GlobalObject::setSection(), swapFPIntParams(), whichFPParamVariantNeeded(), and whichFPReturnVariant().
Referenced by fixupFPReturnAndCall().
|
static |
Definition at line 447 of file Mips16HardFloat.cpp.
References llvm::Function::addFnAttr(), llvm::BasicBlock::Create(), llvm::Function::Create(), emitInlineAsm(), F, llvm::Function::getContext(), llvm::GlobalValue::InternalLinkage, llvm::MipsTargetMachine::isLittleEndian(), llvm::TargetMachine::isPositionIndependent(), llvm::GlobalObject::setSection(), and swapFPIntParams().
Referenced by runHardFloatOnModule().
|
static |
Definition at line 50 of file Mips16HardFloat.cpp.
References llvm::InlineAsm::AD_ATT, C(), llvm::CallInst::Create(), llvm::FunctionType::get(), llvm::InlineAsm::get(), and llvm::Type::getVoidTy().
Referenced by assureFPCallStub(), and createFPFnStub().
|
static |
Definition at line 380 of file Mips16HardFloat.cpp.
References A(), assureFPCallStub(), C(), llvm::CallInst::Create(), llvm::dyn_cast(), F, llvm::Value::getType(), llvm::Type::getVoidTy(), llvm::Attribute::getWithMemoryEffects(), I, isIntrinsicInline(), llvm::TargetMachine::isPositionIndependent(), Modified, needsFPHelperFromSig(), needsFPReturnHelper(), NoFPRet, llvm::MemoryEffectsBase< IRMemLocation >::none(), T, and whichFPReturnVariant().
Referenced by runHardFloatOnModule().
Definition at line 374 of file Mips16HardFloat.cpp.
References llvm::binary_search(), F, and IntrinsicInline.
Referenced by fixupFPReturnAndCall().
Definition at line 184 of file Mips16HardFloat.cpp.
References F, needsFPReturnHelper(), and needsFPStubFromParams().
Referenced by fixupFPReturnAndCall().
Definition at line 174 of file Mips16HardFloat.cpp.
References F, NoFPRet, and whichFPReturnVariant().
Referenced by fixupFPReturnAndCall(), and needsFPHelperFromSig().
|
static |
Definition at line 179 of file Mips16HardFloat.cpp.
References NoFPRet, and whichFPReturnVariant().
Definition at line 160 of file Mips16HardFloat.cpp.
References llvm::Type::DoubleTyID, F, llvm::Type::FloatTyID, and llvm::Type::getTypeID().
Referenced by needsFPHelperFromSig().
|
static |
Definition at line 500 of file Mips16HardFloat.cpp.
References createFPFnStub(), E(), llvm::errs(), F, fixupFPReturnAndCall(), llvm::TargetMachine::getSubtarget(), llvm::MipsSubtarget::inMips16HardFloat(), LLVM_DEBUG, Modified, NoSig, V, and whichFPParamVariantNeeded().
Referenced by llvm::Mips16HardFloatPass::run().
|
static |
Definition at line 190 of file Mips16HardFloat.cpp.
References DDSig, DFSig, DSig, FDSig, FFSig, FSig, MI, and NoSig.
Referenced by assureFPCallStub(), and createFPFnStub().
|
static |
Definition at line 110 of file Mips16HardFloat.cpp.
References DDSig, DFSig, DoubleTyID, DSig, F, FDSig, FFSig, FloatTyID, FSig, llvm_unreachable, and NoSig.
Referenced by assureFPCallStub(), and runHardFloatOnModule().
|
static |
Definition at line 74 of file Mips16HardFloat.cpp.
References llvm::cast(), CDRet, CFRet, llvm::Type::DoubleTyID, DRet, llvm::Type::FloatTyID, FRet, NoFPRet, llvm::Type::StructTyID, and T.
Referenced by assureFPCallStub(), fixupFPReturnAndCall(), needsFPReturnHelper(), and needsFPReturnHelper().
| const Type::TypeID DoubleTyID = Type::DoubleTyID |
Definition at line 108 of file Mips16HardFloat.cpp.
| const Type::TypeID FloatTyID = Type::FloatTyID |
Definition at line 107 of file Mips16HardFloat.cpp.
Definition at line 352 of file Mips16HardFloat.cpp.
Referenced by isIntrinsicInline().