Path: blob/main/contrib/llvm-project/llvm/lib/Target/VE/VEInstrBuilder.h
35267 views
//===-- VEInstrBuilder.h - Aides for building VE insts ----------*- 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//===----------------------------------------------------------------------===//7//8// This file exposes functions that may be used with BuildMI from the9// MachineInstrBuilder.h file to simplify generating frame and constant pool10// references.11//12// For reference, the order of operands for memory references is:13// (Operand), Dest Reg, Base Reg, and either Reg Index or Immediate14// Displacement.15//16//===----------------------------------------------------------------------===//1718#ifndef LLVM_LIB_TARGET_VE_VEINSTRBUILDER_H19#define LLVM_LIB_TARGET_VE_VEINSTRBUILDER_H2021#include "llvm/CodeGen/MachineInstrBuilder.h"2223namespace llvm {2425/// addFrameReference - This function is used to add a reference to the base of26/// an abstract object on the stack frame of the current function. This27/// reference has base register as the FrameIndex offset until it is resolved.28/// This allows a constant offset to be specified as well...29///30static inline const MachineInstrBuilder &31addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset = 0,32bool ThreeOp = true) {33if (ThreeOp)34return MIB.addFrameIndex(FI).addImm(0).addImm(Offset);35return MIB.addFrameIndex(FI).addImm(Offset);36}3738} // namespace llvm3940#endif414243