LLVM: include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_CODEGEN_GLOBALISEL_GISELCHANGEOBSERVER_H
15#define LLVM_CODEGEN_GLOBALISEL_GISELCHANGEOBSERVER_H
16
20
21namespace llvm {
24
25
26
27
28
29
32
33public:
35
36
38
39
40
41
42
43
45
46
48
49
51
52
53
54
55
58
59
61};
62
63
64
65
66
70
71public:
74
76
77
80 if (It != Observers.end())
81 Observers.erase(It);
82 }
83
85
86
88 for (auto &O : Observers)
89 O->erasingInstr(MI);
90 }
92 for (auto &O : Observers)
93 O->createdInstr(MI);
94 }
96 for (auto &O : Observers)
97 O->changingInstr(MI);
98 }
100 for (auto &O : Observers)
101 O->changedInstr(MI);
102 }
103
106};
107
108
109
110
120
121
122
123
132
133
143
144
145
146
148public:
153
154private:
157};
158
159}
160#endif
unsigned const MachineRegisterInfo * MRI
amdgpu aa AMDGPU Address space based Alias Analysis Wrapper
This file defines the SmallPtrSet class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Abstract class that contains various methods for clients to notify about changes.
Definition GISelChangeObserver.h:30
virtual void changingInstr(MachineInstr &MI)=0
This instruction is about to be mutated in some way.
LLVM_ABI void finishedChangingAllUsesOfReg()
All instructions reported as changing by changingAllUsesOfReg() have finished being changed.
virtual void changedInstr(MachineInstr &MI)=0
This instruction was mutated in some way.
virtual ~GISelChangeObserver()=default
virtual void createdInstr(MachineInstr &MI)=0
An instruction has been created and inserted into the function.
virtual void erasingInstr(MachineInstr &MI)=0
An instruction is about to be erased.
LLVM_ABI void changingAllUsesOfReg(const MachineRegisterInfo &MRI, Register Reg)
All the instructions using the given register are being changed.
Simple wrapper observer that takes several observers, and calls each one for each event.
Definition GISelChangeObserver.h:68
void MF_HandleInsertion(MachineInstr &MI) override
Callback after an insertion. This should not modify the MI directly.
Definition GISelChangeObserver.h:104
void removeObserver(GISelChangeObserver *O)
Definition GISelChangeObserver.h:78
void changedInstr(MachineInstr &MI) override
This instruction was mutated in some way.
Definition GISelChangeObserver.h:99
void MF_HandleRemoval(MachineInstr &MI) override
Callback before a removal. This should not modify the MI directly.
Definition GISelChangeObserver.h:105
void changingInstr(MachineInstr &MI) override
This instruction is about to be mutated in some way.
Definition GISelChangeObserver.h:95
void createdInstr(MachineInstr &MI) override
An instruction has been created and inserted into the function.
Definition GISelChangeObserver.h:91
GISelObserverWrapper()=default
void erasingInstr(MachineInstr &MI) override
An instruction is about to be erased.
Definition GISelChangeObserver.h:87
void addObserver(GISelChangeObserver *O)
Definition GISelChangeObserver.h:75
void clearObservers()
Definition GISelChangeObserver.h:84
GISelObserverWrapper(ArrayRef< GISelChangeObserver * > Obs)
Definition GISelChangeObserver.h:73
Representation of each machine instruction.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
A simple RAII based Delegate installer.
Definition GISelChangeObserver.h:111
LLVM_ABI ~RAIIDelegateInstaller()
LLVM_ABI RAIIDelegateInstaller(MachineFunction &MF, MachineFunction::Delegate *Del)
RAIIMFObsDelInstaller(MachineFunction &MF, GISelObserverWrapper &Wrapper)
Definition GISelChangeObserver.h:139
~RAIIMFObsDelInstaller()=default
A simple RAII based Observer installer.
Definition GISelChangeObserver.h:124
LLVM_ABI ~RAIIMFObserverInstaller()
LLVM_ABI RAIIMFObserverInstaller(MachineFunction &MF, GISelChangeObserver &Observer)
LLVM_ABI ~RAIITemporaryObserverInstaller()
LLVM_ABI RAIITemporaryObserverInstaller(GISelObserverWrapper &Observers, GISelChangeObserver &TemporaryObserver)
Wrapper class representing virtual and physical registers.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.