47 lines
1.4 KiB
C++
47 lines
1.4 KiB
C++
//=- LoongArchISelLowering.h - LoongArch DAG Lowering Interface -*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines the interfaces that LoongArch uses to lower LLVM code into
|
|
// a selection DAG.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_TARGET_LOONGARCH_LOONGARCHISELLOWERING_H
|
|
#define LLVM_LIB_TARGET_LOONGARCH_LOONGARCHISELLOWERING_H
|
|
|
|
#include "LoongArch.h"
|
|
#include "llvm/CodeGen/CallingConvLower.h"
|
|
#include "llvm/CodeGen/SelectionDAG.h"
|
|
#include "llvm/CodeGen/TargetLowering.h"
|
|
|
|
namespace llvm {
|
|
class LoongArchSubtarget;
|
|
struct LoongArchRegisterInfo;
|
|
namespace LoongArchISD {
|
|
enum NodeType : unsigned {
|
|
FIRST_NUMBER = ISD::BUILTIN_OP_END,
|
|
|
|
// TODO: add more LoongArchISDs
|
|
|
|
};
|
|
} // namespace LoongArchISD
|
|
|
|
class LoongArchTargetLowering : public TargetLowering {
|
|
const LoongArchSubtarget &Subtarget;
|
|
|
|
public:
|
|
explicit LoongArchTargetLowering(const TargetMachine &TM,
|
|
const LoongArchSubtarget &STI);
|
|
|
|
const LoongArchSubtarget &getSubtarget() const { return Subtarget; }
|
|
};
|
|
|
|
} // end namespace llvm
|
|
|
|
#endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCHISELLOWERING_H
|