LLVM: include/llvm/CodeGen/DFAPacketizer.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25#ifndef LLVM_CODEGEN_DFAPACKETIZER_H
26#define LLVM_CODEGEN_DFAPACKETIZER_H
27
32#include
33#include
34#include
35#include
36#include
37
38namespace llvm {
39
48
49
50
52private:
54
55 std::vector<std::unique_ptr> Mutations;
56
57public:
60
61
63
64
66 Mutations.push_back(std::move(Mutation));
67 }
68
69protected:
71};
72
74private:
77
78
80
81public:
84 : InstrItins(InstrItins), A(std::move(a)), ItinActions(ItinActions) {
85
86 A.enableTranscription(false);
87 }
88
89
93
94
95
96
98 A.enableTranscription(Track);
99 }
100
101
102
104
105
106
108
109
110
112
113
114
116
117
118
119
120
121
122
123
125
127};
128
129
130
131
132
133
134
135
137protected:
141
142
144
146
148
150
151public:
152
158
159
163
164
166
167
173
174
175
176
179
180
181
183
184
189
190
191
193
194
195
196
197
198
199
201
202
206
207
211
212
214
216 bool UseTBAA = true) const;
217
218private:
220 bool UseTBAA = true) const;
221};
222
223}
224
225#endif
static cl::opt< bool > UseTBAA("use-tbaa-in-sched-mi", cl::Hidden, cl::init(true), cl::desc("Enable use of TBAA during MI DAG construction"))
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A deterministic finite-state automaton.
Definition DFAPacketizer.h:73
unsigned getUsedResources(unsigned InstIdx)
DFAPacketizer(const InstrItineraryData *InstrItins, Automaton< uint64_t > a, ArrayRef< unsigned > ItinActions)
Definition DFAPacketizer.h:82
const InstrItineraryData * getInstrItins() const
Definition DFAPacketizer.h:126
bool canReserveResources(const MCInstrDesc *MID)
void reserveResources(const MCInstrDesc *MID)
void clearResources()
Definition DFAPacketizer.h:90
void setTrackResources(bool Track)
Definition DFAPacketizer.h:97
Definition DFAPacketizer.h:51
void addMutation(std::unique_ptr< ScheduleDAGMutation > Mutation)
DefaultVLIWScheduler takes ownership of the Mutation object.
Definition DFAPacketizer.h:65
void postProcessDAG()
Apply each ScheduleDAGMutation step in order.
void schedule() override
Orders nodes according to selected style.
DefaultVLIWScheduler(MachineFunction &MF, MachineLoopInfo &MLI, AAResults *AA)
Itinerary data supplied by a subtarget to be used by a target.
Describe properties that are true of each instruction in the target description file.
MachineInstrBundleIterator< MachineInstr > iterator
Representation of each machine instruction.
A description of a memory reference used in the backend.
Scheduling unit. This is a node in the scheduling DAG.
ScheduleDAGInstrs(MachineFunction &mf, const MachineLoopInfo *mli, bool RemoveKillFlags=false)
const MachineLoopInfo * MLI
Mutate the DAG as a postpass after normal DAG building.
MachineFunction & MF
Machine function.
TargetInstrInfo - Interface to description of machine instruction set.
MachineFunction & MF
Definition DFAPacketizer.h:138
VLIWPacketizerList(MachineFunction &MF, MachineLoopInfo &MLI, AAResults *AA)
virtual bool isSoloInstruction(const MachineInstr &MI)
Definition DFAPacketizer.h:192
void addMutation(std::unique_ptr< ScheduleDAGMutation > Mutation)
VLIWPacketizerList(const VLIWPacketizerList &other)=delete
virtual bool isLegalToPacketizeTogether(SUnit *SUI, SUnit *SUJ)
Definition DFAPacketizer.h:203
AAResults * AA
Definition DFAPacketizer.h:140
const TargetInstrInfo * TII
Definition DFAPacketizer.h:139
bool alias(const MachineInstr &MI1, const MachineInstr &MI2, bool UseTBAA=true) const
std::vector< MachineInstr * > CurrentPacketMIs
Definition DFAPacketizer.h:145
std::map< MachineInstr *, SUnit * > MIToSUnit
Definition DFAPacketizer.h:149
VLIWPacketizerList & operator=(const VLIWPacketizerList &other)=delete
DefaultVLIWScheduler * VLIWScheduler
Definition DFAPacketizer.h:143
virtual ~VLIWPacketizerList()
virtual bool isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ)
Definition DFAPacketizer.h:208
DFAPacketizer * ResourceTracker
Definition DFAPacketizer.h:147
virtual void initPacketizerState()
Definition DFAPacketizer.h:182
virtual void endPacket(MachineBasicBlock *MBB, MachineBasicBlock::iterator MI)
virtual bool ignorePseudoInstruction(const MachineInstr &I, const MachineBasicBlock *MBB)
Definition DFAPacketizer.h:185
DFAPacketizer * getResourceTracker()
Definition DFAPacketizer.h:165
void PacketizeMIs(MachineBasicBlock *MBB, MachineBasicBlock::iterator BeginItr, MachineBasicBlock::iterator EndItr)
virtual MachineBasicBlock::iterator addToPacket(MachineInstr &MI)
Definition DFAPacketizer.h:168
virtual bool shouldAddToPacket(const MachineInstr &MI)
Definition DFAPacketizer.h:200
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.