Go to the documentation of this file.
17 const char *
const LibCalls[] = {
18 "__addtf3",
"__divtf3",
"__eqtf2",
"__extenddftf2",
19 "__extendsftf2",
"__fixtfdi",
"__fixtfsi",
"__fixtfti",
20 "__fixunstfdi",
"__fixunstfsi",
"__fixunstfti",
"__floatditf",
21 "__floatsitf",
"__floattitf",
"__floatunditf",
"__floatunsitf",
22 "__floatuntitf",
"__getf2",
"__gttf2",
"__letf2",
23 "__lttf2",
"__multf3",
"__netf2",
"__powitf2",
24 "__subtf3",
"__trunctfdf2",
"__trunctfsf2",
"__unordtf2",
25 "ceill",
"copysignl",
"cosl",
"exp2l",
26 "expl",
"floorl",
"fmal",
"fmaxl",
27 "fmodl",
"log10l",
"log2l",
"logl",
28 "nearbyintl",
"powl",
"rintl",
"roundl",
29 "sinl",
"sqrtl",
"truncl"};
32 auto Comp = [](
const char *S1,
const char *S2) {
return strcmp(S1, S2) < 0; };
75 dyn_cast<const GlobalAddressSDNode>(
Callee)) {
77 Function *
F =
G->getGlobal()->getParent()->getFunction(Sym);
78 if (
F &&
F->hasFnAttribute(
"__Mips16RetHelper")) {
83 return SpecialCallingConv;
86 void MipsCCState::PreAnalyzeCallResultForF128(
88 const Type *RetTy,
const char *Call) {
89 for (
unsigned i = 0;
i <
Ins.size(); ++
i) {
90 OriginalArgWasF128.push_back(
98 void MipsCCState::PreAnalyzeReturnForF128(
101 for (
unsigned i = 0;
i < Outs.size(); ++
i) {
102 OriginalArgWasF128.push_back(
104 OriginalArgWasFloat.push_back(
111 void MipsCCState::PreAnalyzeCallResultForVectorFloat(
113 for (
unsigned i = 0;
i <
Ins.size(); ++
i) {
120 void MipsCCState::PreAnalyzeReturnForVectorFloat(
122 for (
unsigned i = 0;
i < Outs.size(); ++
i) {
124 OriginalRetWasFloatVector.push_back(
131 void MipsCCState::PreAnalyzeCallOperands(
133 std::vector<TargetLowering::ArgListEntry> &FuncArgs,
135 for (
unsigned i = 0;
i < Outs.size(); ++
i) {
136 TargetLowering::ArgListEntry FuncArg = FuncArgs[Outs[
i].OrigArgIndex];
139 OriginalArgWasFloat.push_back(FuncArg.Ty->isFloatingPointTy());
140 OriginalArgWasFloatVector.push_back(FuncArg.Ty->isVectorTy());
141 CallOperandIsFixed.push_back(Outs[
i].IsFixed);
147 void MipsCCState::PreAnalyzeFormalArgumentsForF128(
150 for (
unsigned i = 0;
i <
Ins.size(); ++
i) {
156 if (
Ins[
i].Flags.isSRet()) {
157 OriginalArgWasF128.push_back(
false);
158 OriginalArgWasFloat.push_back(
false);
159 OriginalArgWasFloatVector.push_back(
false);
164 std::advance(FuncArg,
Ins[
i].getOrigArgIndex());
166 OriginalArgWasF128.push_back(
This class represents an incoming formal argument to a Function.
This class represents lattice values for constants.
Represents one node in the SelectionDAG.
bool isFPOrFPVectorTy() const
Return true if this is a FP type or a vector of FP.
The instances of the Type class are immutable: once they are created, they are never changed.
const_iterator end(StringRef path)
Get end iterator over path.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
MachineFunction & getMachineFunction() const
bool isFloatingPointTy() const
Return true if this is one of the six floating-point types.
static SpecialCallingConvType getSpecialCallingConvForCallee(const SDNode *Callee, const MipsSubtarget &Subtarget)
Determine the SpecialCallingConvType for the given callee.
static bool isF128SoftLibCall(const char *CallSym)
This function returns true if CallSym is a long double emulation routine.
bool isVectorTy() const
True if this is an instance of VectorType.
static bool originalEVTTypeIsVectorFloat(EVT Ty)
Return true if the original type was vXfXX.
unsigned getStructNumElements() const
bool isIntegerTy() const
True if this is an instance of IntegerType.
Type * getReturnType() const
Returns the type of the ret val.
OutputArg - This struct carries flags and a value for a single outgoing (actual) argument or outgoing...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isVector() const
Return true if this is a vector value type.
StringRef - Represent a constant reference to a string, i.e.
Type * getStructElementType(unsigned N) const
Type * getType() const
All values are typed, get the type of this value.
amdgpu Simplify well known AMD library false FunctionCallee Callee
Function & getFunction()
Return the LLVM function that this machine code represents.
bool is_sorted(R &&Range, Compare C)
Wrapper function around std::is_sorted to check if elements in a range R are sorted with respect to a...
EVT getVectorElementType() const
Given a vector type, return the type of each element.
bool isStructTy() const
True if this is an instance of StructType.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
bool isFP128Ty() const
Return true if this is 'fp128'.
bool isFloatingPoint() const
Return true if this is a FP or a vector FP type.
static bool originalTypeIsVectorFloat(const Type *Ty)
Return true if the original type was vXfXX / vXfXX.
static bool originalTypeIsF128(const Type *Ty, const char *Func)
This function returns true if Ty is fp128, {f128} or i128 which was originally a fp128.
bool inMips16HardFloat() const