LLVM 22.0.0git
SSAContext.h
Go to the documentation of this file.
1//===- SSAContext.h ---------------------------------------------*- C++ -*-===//
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/// \file
9///
10/// This file declares a specialization of the GenericSSAContext<X>
11/// class template for LLVM IR.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_IR_SSACONTEXT_H
16#define LLVM_IR_SSACONTEXT_H
17
19#include "llvm/IR/BasicBlock.h"
20
21namespace llvm {
22class BasicBlock;
23class Function;
24class Instruction;
25class Value;
26
27inline auto instrs(const BasicBlock &BB) {
28 return llvm::make_range(BB.begin(), BB.end());
29}
30
31template <> struct GenericSSATraits<Function> {
35 using ValueRefT = Value *;
36 using ConstValueRefT = const Value *;
37 using UseT = Use;
38};
39
41
42} // namespace llvm
43
44#endif // LLVM_IR_SSACONTEXT_H
This file defines the little GenericSSAContext<X> template class that can be used to implement IR ana...
LLVM Basic Block Representation.
Definition BasicBlock.h:62
iterator end()
Definition BasicBlock.h:472
iterator begin()
Instruction iterator methods.
Definition BasicBlock.h:459
A Use represents the edge between a Value definition and its users.
Definition Use.h:35
LLVM Value Representation.
Definition Value.h:75
This is an optimization pass for GlobalISel generic memory operations.
GenericSSAContext< Function > SSAContext
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
auto instrs(const MachineBasicBlock &BB)