Path: blob/main/contrib/llvm-project/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMatInt.h
35294 views
//===- LoongArchMatInt.h - Immediate materialisation - --------*- C++ -*--===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_MATINT_H9#define LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_MATINT_H1011#include "llvm/ADT/SmallVector.h"12#include <cstdint>1314namespace llvm {15namespace LoongArchMatInt {16struct Inst {17unsigned Opc;18int64_t Imm;19Inst(unsigned Opc, int64_t Imm) : Opc(Opc), Imm(Imm) {}20};21using InstSeq = SmallVector<Inst, 4>;2223// Helper to generate an instruction sequence that will materialise the given24// immediate value into a register.25InstSeq generateInstSeq(int64_t Val);26} // end namespace LoongArchMatInt27} // end namespace llvm2829#endif303132