LLVM
20.0.0git
include
llvm
CodeGen
MachineSSAContext.h
Go to the documentation of this file.
1
//===- MachineSSAContext.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
/// template class for Machine IR.
12
///
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_CODEGEN_MACHINESSACONTEXT_H
16
#define LLVM_CODEGEN_MACHINESSACONTEXT_H
17
18
#include "
llvm/ADT/GenericSSAContext.h
"
19
#include "
llvm/CodeGen/MachineBasicBlock.h
"
20
#include "
llvm/Support/Printable.h
"
21
22
namespace
llvm
{
23
class
MachineInstr;
24
class
MachineFunction;
25
class
Register
;
26
27
inline
unsigned
succ_size
(
const
MachineBasicBlock
*BB) {
28
return
BB->
succ_size
();
29
}
30
inline
unsigned
pred_size
(
const
MachineBasicBlock
*BB) {
31
return
BB->
pred_size
();
32
}
33
inline
auto
instrs
(
const
MachineBasicBlock
&BB) {
return
BB.
instrs
(); }
34
35
template
<>
struct
GenericSSATraits
<
MachineFunction
> {
36
using
BlockT
=
MachineBasicBlock
;
37
using
FunctionT
=
MachineFunction
;
38
using
InstructionT
=
MachineInstr
;
39
using
ValueRefT
=
Register
;
40
using
ConstValueRefT
=
Register
;
41
using
UseT
=
MachineOperand
;
42
};
43
44
using
MachineSSAContext
=
GenericSSAContext<MachineFunction>
;
45
}
// namespace llvm
46
47
#endif
// LLVM_CODEGEN_MACHINESSACONTEXT_H
GenericSSAContext.h
This file defines the little GenericSSAContext<X> template class that can be used to implement IR ana...
MachineBasicBlock.h
Register
Promote Memory to Register
Definition:
Mem2Reg.cpp:110
Printable.h
llvm::GenericSSAContext
Definition:
GenericSSAContext.h:41
llvm::MachineBasicBlock
Definition:
MachineBasicBlock.h:124
llvm::MachineBasicBlock::pred_size
unsigned pred_size() const
Definition:
MachineBasicBlock.h:416
llvm::MachineBasicBlock::instrs
instr_range instrs()
Definition:
MachineBasicBlock.h:349
llvm::MachineBasicBlock::succ_size
unsigned succ_size() const
Definition:
MachineBasicBlock.h:432
llvm::MachineFunction
Definition:
MachineFunction.h:257
llvm::MachineInstr
Representation of each machine instruction.
Definition:
MachineInstr.h:69
llvm::MachineOperand
MachineOperand class - Representation of each machine instruction operand.
Definition:
MachineOperand.h:48
llvm::Register
Wrapper class representing virtual and physical registers.
Definition:
Register.h:19
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::instrs
auto instrs(const MachineBasicBlock &BB)
Definition:
MachineSSAContext.h:33
llvm::succ_size
unsigned succ_size(const MachineBasicBlock *BB)
Definition:
MachineSSAContext.h:27
llvm::pred_size
unsigned pred_size(const MachineBasicBlock *BB)
Definition:
MachineSSAContext.h:30
llvm::GenericSSATraits
Definition:
GenericSSAContext.h:33
Generated on Wed Dec 11 2024 04:19:55 for LLVM by
1.9.6