1//===- llvm/CodeGen/GlobalISel/InstructionSelector.cpp --------------------===//
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 "llvm/CodeGen/GlobalISel/InstructionSelector.h"
10#include "llvm/CodeGen/TargetOpcodes.h"
11
12namespace llvm {
13
14// vtable anchor
15InstructionSelector::~InstructionSelector() = default;
16
17void InstructionSelector::renderFrameIndex(MachineInstrBuilder &MIB,
18 const MachineInstr &MI,
19 int OpIdx) const {
20 assert(MI.getOpcode() == TargetOpcode::G_FRAME_INDEX && OpIdx == -1 &&
21 "Expected G_FRAME_INDEX");
22 MIB.add(MO: MI.getOperand(i: 1));
23}
24
25} // namespace llvm
26