LLVM 22.0.0git
MipsCCState.cpp
Go to the documentation of this file.
1//===---- MipsCCState.cpp - CCState with Mips specific extensions ---------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "MipsCCState.h"
10#include "MipsSubtarget.h"
11#include "llvm/IR/Module.h"
12
13using namespace llvm;
14
17 const MipsSubtarget &Subtarget) {
19 if (Subtarget.inMips16HardFloat()) {
20 if (const GlobalAddressSDNode *G =
22 llvm::StringRef Sym = G->getGlobal()->getName();
23 Function *F = G->getGlobal()->getParent()->getFunction(Sym);
24 if (F && F->hasFnAttribute("__Mips16RetHelper")) {
25 SpecialCallingConv = Mips16RetHelperConv;
26 }
27 }
28 }
29 return SpecialCallingConv;
30}
Module.h This file contains the declarations for the Module class.
#define F(x, y, z)
Definition MD5.cpp:55
#define G(x, y, z)
Definition MD5.cpp:56
static SpecialCallingConvType getSpecialCallingConvForCallee(const SDNode *Callee, const MipsSubtarget &Subtarget)
Determine the SpecialCallingConvType for the given callee.
bool inMips16HardFloat() const
Represents one node in the SelectionDAG.
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:649