LLVM 24.0.0git
PISAUtils.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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/// \file
10/// This file declares utility functions for the PISA backend.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_PISA_PISAUTILS_H
15#define LLVM_LIB_TARGET_PISA_PISAUTILS_H
16
20#include <string>
21
22namespace llvm {
23class MachineInstr;
24class MCInst;
26class StringRef;
27
28namespace PISA {
29// Similar to getDefIgnoringCopies, but skips any bitcast instructions.
30// Return defining instruction (or nil) and index of the (bitcasted) Reg
31// within defining instruction.
32//
33// - when NoVectors is true, stop search if G_BITCAST src/dst is a vector type
34std::tuple<MachineInstr *, unsigned>
35getDefIgnoringBitcasts(Register Reg, const MachineRegisterInfo &MRI,
36 bool NoVectors = false);
37
38} // namespace PISA
39} // namespace llvm
40#endif // LLVM_LIB_TARGET_PISA_PISAUTILS_H
Register Reg
Promote Memory to Register
Definition Mem2Reg.cpp:110
This file declares common definitions used by the PISA MC components.
MachineRegisterInfo & MRI
Instances of this class represent a single low-level machine instruction.
Definition MCInst.h:207
Representation of each machine instruction.
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
std::tuple< MachineInstr *, unsigned > getDefIgnoringBitcasts(Register Reg, const MachineRegisterInfo &MRI, bool NoVectors)
Definition PISAUtils.cpp:27
This is an optimization pass for GlobalISel generic memory operations.