clang 24.0.0git
Action.h
Go to the documentation of this file.
1//===- Action.h - Abstract compilation steps --------------------*- 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
9#ifndef LLVM_CLANG_DRIVER_ACTION_H
10#define LLVM_CLANG_DRIVER_ACTION_H
11
12#include "clang/Basic/LLVM.h"
14#include "clang/Driver/Types.h"
15#include "clang/Driver/Util.h"
16#include "llvm/ADT/ArrayRef.h"
17#include "llvm/ADT/STLExtras.h"
18#include "llvm/ADT/SmallVector.h"
19#include "llvm/ADT/StringRef.h"
20#include "llvm/ADT/iterator_range.h"
21#include <string>
22
23namespace llvm {
24namespace opt {
25
26class Arg;
27
28} // namespace opt
29} // namespace llvm
30
31namespace clang {
32namespace driver {
33
34class ToolChain;
35
36/// Action - Represent an abstract compilation step to perform.
37///
38/// An action represents an edge in the compilation graph; typically
39/// it is a job to transform an input using some tool.
40///
41/// The current driver is hard wired to expect actions which produce a
42/// single primary output, at least in terms of controlling the
43/// compilation. Actions can produce auxiliary files, but can only
44/// produce a single output to feed into subsequent actions.
45///
46/// Actions are usually owned by a Compilation, which creates new
47/// actions via MakeAction().
48class Action {
49public:
50 using size_type = ActionList::size_type;
51 using input_iterator = ActionList::iterator;
52 using input_const_iterator = ActionList::const_iterator;
53 using input_range = llvm::iterator_range<input_iterator>;
54 using input_const_range = llvm::iterator_range<input_const_iterator>;
55
84
85 // The offloading kind determines if this action is binded to a particular
86 // programming model. Each entry reserves one bit. We also have a special kind
87 // to designate the host offloading tool chain.
89 OFK_None = 0x00,
90
91 // The host offloading tool chain.
92 OFK_Host = 0x01,
93
94 // The device offloading tool chains - one bit for each programming model.
95 OFK_Cuda = 0x02,
96 OFK_OpenMP = 0x04,
97 OFK_HIP = 0x08,
98 OFK_SYCL = 0x10,
99
102 };
103
104 static const char *getClassName(ActionClass AC);
105
106private:
107 ActionClass Kind;
108
109 /// The output type of this action.
111
112 ActionList Inputs;
113
114 /// Flag that is set to true if this action can be collapsed with others
115 /// actions that depend on it. This is true by default and set to false when
116 /// the action is used by two different tool chains, which is enabled by the
117 /// offloading support implementation.
118 bool CanBeCollapsedWithNextDependentAction = true;
119
120protected:
121 ///
122 /// Offload information.
123 ///
124
125 /// The host offloading kind - a combination of kinds encoded in a mask.
126 /// Multiple programming models may be supported simultaneously by the same
127 /// host.
129
130 /// Offloading kind of the device.
132
133 /// The Offloading architecture associated with this action.
135
136 /// The Offloading toolchain associated with this device action.
138
139 Action(ActionClass Kind, types::ID Type) : Action(Kind, ActionList(), Type) {}
140 Action(ActionClass Kind, Action *Input, types::ID Type)
141 : Action(Kind, ActionList({Input}), Type) {}
143 : Action(Kind, ActionList({Input}), Input->getType()) {}
144 Action(ActionClass Kind, const ActionList &Inputs, types::ID Type)
145 : Kind(Kind), Type(Type), Inputs(Inputs) {}
146
147public:
148 virtual ~Action();
149
150 const char *getClassName() const { return Action::getClassName(getKind()); }
151
152 ActionClass getKind() const { return Kind; }
153 types::ID getType() const { return Type; }
154
155 ActionList &getInputs() { return Inputs; }
156 const ActionList &getInputs() const { return Inputs; }
157
158 size_type size() const { return Inputs.size(); }
159
160 input_iterator input_begin() { return Inputs.begin(); }
161 input_iterator input_end() { return Inputs.end(); }
163 input_const_iterator input_begin() const { return Inputs.begin(); }
164 input_const_iterator input_end() const { return Inputs.end(); }
168
169 /// Mark this action as not legal to collapse.
171 CanBeCollapsedWithNextDependentAction = false;
172 }
173
174 /// Return true if this function can be collapsed with others.
176 return CanBeCollapsedWithNextDependentAction;
177 }
178
179 /// Return a string containing the offload kind of the action.
180 std::string getOffloadingKindPrefix() const;
181
182 /// Return a string that can be used as prefix in order to generate unique
183 /// files for each offloading kind. By default, no prefix is used for
184 /// non-device kinds, except if \a CreatePrefixForHost is set.
185 static std::string
186 GetOffloadingFileNamePrefix(OffloadKind Kind,
187 StringRef NormalizedTriple,
188 bool CreatePrefixForHost = false);
189
190 /// Return a string containing a offload kind name.
191 static StringRef GetOffloadKindName(OffloadKind Kind);
192
193 /// Set the device offload info of this action and propagate it to its
194 /// dependences.
195 void propagateDeviceOffloadInfo(OffloadKind OKind, BoundArch OArch,
196 const ToolChain *OToolChain);
197
198 /// Append the host offload info of this action and propagate it to its
199 /// dependences.
200 void propagateHostOffloadInfo(unsigned OKinds, BoundArch OArch);
201
202 void setHostOffloadInfo(unsigned OKinds, BoundArch OArch) {
203 ActiveOffloadKindMask |= OKinds;
204 OffloadingArch = OArch;
205 }
206
207 /// Set the offload info of this action to be the same as the provided action,
208 /// and propagate it to its dependences.
209 void propagateOffloadInfo(const Action *A);
210
213 }
214
218 return OffloadingToolChain;
219 }
220
221 /// Check if this action have any offload kinds. Note that host offload kinds
222 /// are only set if the action is a dependence to a host offload action.
223 bool isHostOffloading(unsigned int OKind) const {
224 return ActiveOffloadKindMask & OKind;
225 }
226 bool isDeviceOffloading(OffloadKind OKind) const {
227 return OffloadingDeviceKind == OKind;
228 }
229 bool isOffloading(OffloadKind OKind) const {
230 return isHostOffloading(OKind) || isDeviceOffloading(OKind);
231 }
232};
233
234class InputAction : public Action {
235 const llvm::opt::Arg &Input;
236 std::string Id;
237 virtual void anchor();
238
239public:
240 InputAction(const llvm::opt::Arg &Input, types::ID Type,
241 StringRef Id = StringRef());
242
243 const llvm::opt::Arg &getInputArg() const { return Input; }
244
245 void setId(StringRef _Id) { Id = _Id.str(); }
246 StringRef getId() const { return Id; }
247
248 static bool classof(const Action *A) {
249 return A->getKind() == InputClass;
250 }
251};
252
253class BindArchAction : public Action {
254 virtual void anchor();
255
256 /// The architecture to bind, or empty if the default architecture
257 /// should be bound.
258 BoundArch ArchName;
259
260public:
261 BindArchAction(Action *Input, BoundArch ArchName);
262
263 BoundArch getArch() const { return ArchName; }
264
265 static bool classof(const Action *A) {
266 return A->getKind() == BindArchClass;
267 }
268};
269
270/// An offload action combines host or/and device actions according to the
271/// programming model implementation needs and propagates the offloading kind to
272/// its dependences.
273class OffloadAction final : public Action {
274 LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
275
276public:
277 /// Type used to communicate device actions. It associates bound architecture,
278 /// toolchain, and offload kind to each action.
279 class DeviceDependences final {
280 public:
284
285 private:
286 // Lists that keep the information for each dependency. All the lists are
287 // meant to be updated in sync. We are adopting separate lists instead of a
288 // list of structs, because that simplifies forwarding the actions list to
289 // initialize the inputs of the base Action class.
290
291 /// The dependence actions.
292 ActionList DeviceActions;
293
294 /// The offloading toolchains that should be used with the action.
295 ToolChainList DeviceToolChains;
296
297 /// The architectures that should be used with this action.
298 BoundArchList DeviceBoundArchs;
299
300 /// The offload kind of each dependence.
301 OffloadKindList DeviceOffloadKinds;
302
303 public:
304 /// Add an action along with the associated toolchain, bound arch, and
305 /// offload kind.
306 void add(Action &A, const ToolChain &TC, BoundArch BA, OffloadKind OKind);
307
308 /// Add an action along with the associated toolchain, bound arch, and
309 /// offload kinds.
310 void add(Action &A, const ToolChain &TC, BoundArch BA,
311 unsigned OffloadKindMask);
312
313 /// Get each of the individual arrays.
314 const ActionList &getActions() const { return DeviceActions; }
315 const ToolChainList &getToolChains() const { return DeviceToolChains; }
316 const BoundArchList &getBoundArchs() const { return DeviceBoundArchs; }
318 return DeviceOffloadKinds;
319 }
320 };
321
322 /// Type used to communicate host actions. It associates bound architecture,
323 /// toolchain, and offload kinds to the host action.
324 class HostDependence final {
325 /// The dependence action.
326 Action &HostAction;
327
328 /// The offloading toolchain that should be used with the action.
329 const ToolChain &HostToolChain;
330
331 /// The architectures that should be used with this action.
332 BoundArch HostBoundArch;
333
334 /// The offload kind of each dependence.
335 unsigned HostOffloadKinds = 0u;
336
337 public:
339 const unsigned OffloadKinds)
340 : HostAction(A), HostToolChain(TC), HostBoundArch(BA),
341 HostOffloadKinds(OffloadKinds) {}
342
343 /// Constructor version that obtains the offload kinds from the device
344 /// dependencies.
346 const DeviceDependences &DDeps);
347 Action *getAction() const { return &HostAction; }
348 const ToolChain *getToolChain() const { return &HostToolChain; }
349 BoundArch getBoundArch() const { return HostBoundArch; }
350 unsigned getOffloadKinds() const { return HostOffloadKinds; }
351 };
352
354 llvm::function_ref<void(Action *, const ToolChain *, BoundArch)>;
355
356private:
357 /// The host offloading toolchain that should be used with the action.
358 const ToolChain *HostTC = nullptr;
359
360 /// The tool chains associated with the list of actions.
362
363public:
364 OffloadAction(const HostDependence &HDep);
365 OffloadAction(const DeviceDependences &DDeps, types::ID Ty);
366 OffloadAction(const HostDependence &HDep, const DeviceDependences &DDeps);
367
368 /// Execute the work specified in \a Work on the host dependence.
369 void doOnHostDependence(const OffloadActionWorkTy &Work) const;
370
371 /// Execute the work specified in \a Work on each device dependence.
372 void doOnEachDeviceDependence(const OffloadActionWorkTy &Work) const;
373
374 /// Execute the work specified in \a Work on each dependence.
375 void doOnEachDependence(const OffloadActionWorkTy &Work) const;
376
377 /// Execute the work specified in \a Work on each host or device dependence if
378 /// \a IsHostDependenceto is true or false, respectively.
379 void doOnEachDependence(bool IsHostDependence,
380 const OffloadActionWorkTy &Work) const;
381
382 /// Return true if the action has a host dependence.
383 bool hasHostDependence() const;
384
385 /// Return the host dependence of this action. This function is only expected
386 /// to be called if the host dependence exists.
387 Action *getHostDependence() const;
388
389 /// Return true if the action has a single device dependence. If \a
390 /// DoNotConsiderHostActions is set, ignore the host dependence, if any, while
391 /// accounting for the number of dependences.
392 bool hasSingleDeviceDependence(bool DoNotConsiderHostActions = false) const;
393
394 /// Return the single device dependence of this action. This function is only
395 /// expected to be called if a single device dependence exists. If \a
396 /// DoNotConsiderHostActions is set, a host dependence is allowed.
397 Action *
398 getSingleDeviceDependence(bool DoNotConsiderHostActions = false) const;
399
400 static bool classof(const Action *A) { return A->getKind() == OffloadClass; }
401};
402
403class JobAction : public Action {
404 virtual void anchor();
405
406protected:
407 JobAction(ActionClass Kind, Action *Input, types::ID Type);
408 JobAction(ActionClass Kind, const ActionList &Inputs, types::ID Type);
409
410public:
411 static bool classof(const Action *A) {
412 return (A->getKind() >= JobClassFirst &&
413 A->getKind() <= JobClassLast);
414 }
415};
416
418 void anchor() override;
419
420public:
421 PreprocessJobAction(Action *Input, types::ID OutputType);
422
423 static bool classof(const Action *A) {
424 return A->getKind() == PreprocessJobClass;
425 }
426};
427
429 void anchor() override;
430
431protected:
432 PrecompileJobAction(ActionClass Kind, Action *Input, types::ID OutputType);
433
434public:
435 PrecompileJobAction(Action *Input, types::ID OutputType);
436
437 static bool classof(const Action *A) {
438 return A->getKind() == PrecompileJobClass;
439 }
440};
441
443 void anchor() override;
444
445public:
446 ExtractAPIJobAction(Action *Input, types::ID OutputType);
447
448 static bool classof(const Action *A) {
449 return A->getKind() == ExtractAPIJobClass;
450 }
451
452 void addHeaderInput(Action *Input) { getInputs().push_back(Input); }
453};
454
456 void anchor() override;
457
458public:
459 AnalyzeJobAction(Action *Input, types::ID OutputType);
460
461 static bool classof(const Action *A) {
462 return A->getKind() == AnalyzeJobClass;
463 }
464};
465
467 void anchor() override;
468
469public:
470 CompileJobAction(Action *Input, types::ID OutputType);
471
472 static bool classof(const Action *A) {
473 return A->getKind() == CompileJobClass;
474 }
475};
476
478 void anchor() override;
479
480public:
481 BackendJobAction(Action *Input, types::ID OutputType);
482
483 static bool classof(const Action *A) {
484 return A->getKind() == BackendJobClass;
485 }
486};
487
489 void anchor() override;
490
491public:
492 AssembleJobAction(Action *Input, types::ID OutputType);
493
494 static bool classof(const Action *A) {
495 return A->getKind() == AssembleJobClass;
496 }
497};
498
500 void anchor() override;
501
502public:
504
505 static bool classof(const Action *A) {
506 return A->getKind() == IfsMergeJobClass;
507 }
508};
509
510class LinkJobAction : public JobAction {
511 void anchor() override;
512
513public:
514 LinkJobAction(ActionList &Inputs, types::ID Type);
515
516 static bool classof(const Action *A) {
517 return A->getKind() == LinkJobClass;
518 }
519};
520
521class LipoJobAction : public JobAction {
522 void anchor() override;
523
524public:
525 LipoJobAction(ActionList &Inputs, types::ID Type);
526
527 static bool classof(const Action *A) {
528 return A->getKind() == LipoJobClass;
529 }
530};
531
533 void anchor() override;
534
535public:
537
538 static bool classof(const Action *A) {
539 return A->getKind() == DsymutilJobClass;
540 }
541};
542
544 void anchor() override;
545
546public:
547 VerifyJobAction(ActionClass Kind, Action *Input, types::ID Type);
548
549 static bool classof(const Action *A) {
550 return A->getKind() == VerifyDebugInfoJobClass ||
552 }
553};
554
556 void anchor() override;
557
558public:
560
561 static bool classof(const Action *A) {
562 return A->getKind() == VerifyDebugInfoJobClass;
563 }
564};
565
567 void anchor() override;
568
569public:
570 VerifyPCHJobAction(Action *Input, types::ID Type);
571
572 static bool classof(const Action *A) {
573 return A->getKind() == VerifyPCHJobClass;
574 }
575};
576
578 void anchor() override;
579
580public:
581 // Offloading bundling doesn't change the type of output.
583
584 static bool classof(const Action *A) {
585 return A->getKind() == OffloadBundlingJobClass;
586 }
587};
588
590 void anchor() override;
591
592public:
594
595 static bool classof(const Action *A) {
596 return A->getKind() == OffloadPackagerJobClass;
597 }
598};
599
601 void anchor() override;
602
603public:
605
606 static bool classof(const Action *A) {
607 return A->getKind() == LinkerWrapperJobClass;
608 }
609};
610
612 void anchor() override;
613
614public:
616
617 static bool classof(const Action *A) {
618 return A->getKind() == StaticLibJobClass;
619 }
620};
621
623 void anchor() override;
624
625public:
627
628 static bool classof(const Action *A) {
629 return A->getKind() == BinaryAnalyzeJobClass;
630 }
631};
632
634 void anchor() override;
635
636public:
638
639 static bool classof(const Action *A) {
640 return A->getKind() == BinaryTranslatorJobClass;
641 }
642};
643
645 void anchor() override;
646
647public:
649
650 static bool classof(const Action *A) {
651 return A->getKind() == ObjcopyJobClass;
652 }
653};
654
655} // namespace driver
656} // namespace clang
657
658#endif // LLVM_CLANG_DRIVER_ACTION_H
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
The base class of the type hierarchy.
Definition TypeBase.h:1879
Action - Represent an abstract compilation step to perform.
Definition Action.h:48
input_const_iterator input_begin() const
Definition Action.h:163
OffloadKind OffloadingDeviceKind
Offloading kind of the device.
Definition Action.h:131
Action(ActionClass Kind, types::ID Type)
Definition Action.h:139
size_type size() const
Definition Action.h:158
bool isCollapsingWithNextDependentActionLegal() const
Return true if this function can be collapsed with others.
Definition Action.h:175
types::ID getType() const
Definition Action.h:153
void setCannotBeCollapsedWithNextDependentAction()
Mark this action as not legal to collapse.
Definition Action.h:170
std::string getOffloadingKindPrefix() const
Return a string containing the offload kind of the action.
Definition Action.cpp:100
ActionList::size_type size_type
Definition Action.h:50
const ToolChain * getOffloadingToolChain() const
Definition Action.h:217
input_iterator input_end()
Definition Action.h:161
const ToolChain * OffloadingToolChain
The Offloading toolchain associated with this device action.
Definition Action.h:137
Action(ActionClass Kind, Action *Input, types::ID Type)
Definition Action.h:140
static std::string GetOffloadingFileNamePrefix(OffloadKind Kind, StringRef NormalizedTriple, bool CreatePrefixForHost=false)
Return a string that can be used as prefix in order to generate unique files for each offloading kind...
Definition Action.cpp:143
BoundArch getOffloadingArch() const
Definition Action.h:216
Action(ActionClass Kind, Action *Input)
Definition Action.h:142
void propagateOffloadInfo(const Action *A)
Set the offload info of this action to be the same as the provided action, and propagate it to its de...
Definition Action.cpp:91
const ActionList & getInputs() const
Definition Action.h:156
ActionClass getKind() const
Definition Action.h:152
ActionList::iterator input_iterator
Definition Action.h:51
static StringRef GetOffloadKindName(OffloadKind Kind)
Return a string containing a offload kind name.
Definition Action.cpp:159
input_const_range inputs() const
Definition Action.h:165
const char * getClassName() const
Definition Action.h:150
OffloadKind getOffloadingDeviceKind() const
Definition Action.h:215
input_const_iterator input_end() const
Definition Action.h:164
input_iterator input_begin()
Definition Action.h:160
void propagateDeviceOffloadInfo(OffloadKind OKind, BoundArch OArch, const ToolChain *OToolChain)
Set the device offload info of this action and propagate it to its dependences.
Definition Action.cpp:60
unsigned ActiveOffloadKindMask
Offload information.
Definition Action.h:128
input_range inputs()
Definition Action.h:162
Action(ActionClass Kind, const ActionList &Inputs, types::ID Type)
Definition Action.h:144
bool isHostOffloading(unsigned int OKind) const
Check if this action have any offload kinds.
Definition Action.h:223
void propagateHostOffloadInfo(unsigned OKinds, BoundArch OArch)
Append the host offload info of this action and propagate it to its dependences.
Definition Action.cpp:77
bool isDeviceOffloading(OffloadKind OKind) const
Definition Action.h:226
BoundArch OffloadingArch
The Offloading architecture associated with this action.
Definition Action.h:134
void setHostOffloadInfo(unsigned OKinds, BoundArch OArch)
Definition Action.h:202
ActionList::const_iterator input_const_iterator
Definition Action.h:52
ActionList & getInputs()
Definition Action.h:155
llvm::iterator_range< input_iterator > input_range
Definition Action.h:53
llvm::iterator_range< input_const_iterator > input_const_range
Definition Action.h:54
unsigned getOffloadingHostActiveKinds() const
Definition Action.h:211
bool isOffloading(OffloadKind OKind) const
Definition Action.h:229
static bool classof(const Action *A)
Definition Action.h:461
AnalyzeJobAction(Action *Input, types::ID OutputType)
Definition Action.cpp:370
AssembleJobAction(Action *Input, types::ID OutputType)
Definition Action.cpp:385
static bool classof(const Action *A)
Definition Action.h:494
static bool classof(const Action *A)
Definition Action.h:483
BackendJobAction(Action *Input, types::ID OutputType)
Definition Action.cpp:380
static bool classof(const Action *A)
Definition Action.h:628
BinaryAnalyzeJobAction(Action *Input, types::ID Type)
Definition Action.cpp:452
BinaryTranslatorJobAction(Action *Input, types::ID Type)
Definition Action.cpp:457
static bool classof(const Action *A)
Definition Action.h:639
static bool classof(const Action *A)
Definition Action.h:265
BindArchAction(Action *Input, BoundArch ArchName)
Definition Action.cpp:186
BoundArch getArch() const
Definition Action.h:263
static bool classof(const Action *A)
Definition Action.h:472
CompileJobAction(Action *Input, types::ID OutputType)
Definition Action.cpp:375
DsymutilJobAction(ActionList &Inputs, types::ID Type)
Definition Action.cpp:405
static bool classof(const Action *A)
Definition Action.h:538
static bool classof(const Action *A)
Definition Action.h:448
ExtractAPIJobAction(Action *Input, types::ID OutputType)
Definition Action.cpp:365
void addHeaderInput(Action *Input)
Definition Action.h:452
static bool classof(const Action *A)
Definition Action.h:505
IfsMergeJobAction(ActionList &Inputs, types::ID Type)
Definition Action.cpp:390
void setId(StringRef _Id)
Definition Action.h:245
InputAction(const llvm::opt::Arg &Input, types::ID Type, StringRef Id=StringRef())
Definition Action.cpp:181
const llvm::opt::Arg & getInputArg() const
Definition Action.h:243
static bool classof(const Action *A)
Definition Action.h:248
StringRef getId() const
Definition Action.h:246
static bool classof(const Action *A)
Definition Action.h:411
JobAction(ActionClass Kind, Action *Input, types::ID Type)
Definition Action.cpp:341
static bool classof(const Action *A)
Definition Action.h:516
LinkJobAction(ActionList &Inputs, types::ID Type)
Definition Action.cpp:395
static bool classof(const Action *A)
Definition Action.h:606
LinkerWrapperJobAction(ActionList &Inputs, types::ID Type)
Definition Action.cpp:441
static bool classof(const Action *A)
Definition Action.h:527
LipoJobAction(ActionList &Inputs, types::ID Type)
Definition Action.cpp:400
static bool classof(const Action *A)
Definition Action.h:650
ObjcopyJobAction(ActionList &Inputs, types::ID Type)
Definition Action.cpp:463
Type used to communicate device actions.
Definition Action.h:279
SmallVector< const ToolChain *, 3 > ToolChainList
Definition Action.h:281
SmallVector< BoundArch, 3 > BoundArchList
Definition Action.h:282
const BoundArchList & getBoundArchs() const
Definition Action.h:316
const OffloadKindList & getOffloadKinds() const
Definition Action.h:317
const ActionList & getActions() const
Get each of the individual arrays.
Definition Action.h:314
SmallVector< OffloadKind, 3 > OffloadKindList
Definition Action.h:283
void add(Action &A, const ToolChain &TC, BoundArch BA, OffloadKind OKind)
Add an action along with the associated toolchain, bound arch, and offload kind.
Definition Action.cpp:310
const ToolChainList & getToolChains() const
Definition Action.h:315
Type used to communicate host actions.
Definition Action.h:324
HostDependence(Action &A, const ToolChain &TC, BoundArch BA, const unsigned OffloadKinds)
Definition Action.h:338
const ToolChain * getToolChain() const
Definition Action.h:348
void doOnEachDependence(const OffloadActionWorkTy &Work) const
Execute the work specified in Work on each dependence.
Definition Action.cpp:273
Action * getSingleDeviceDependence(bool DoNotConsiderHostActions=false) const
Return the single device dependence of this action.
Definition Action.cpp:302
bool hasSingleDeviceDependence(bool DoNotConsiderHostActions=false) const
Return true if the action has a single device dependence.
Definition Action.cpp:294
Action * getHostDependence() const
Return the host dependence of this action.
Definition Action.cpp:288
void doOnEachDeviceDependence(const OffloadActionWorkTy &Work) const
Execute the work specified in Work on each device dependence.
Definition Action.cpp:251
bool hasHostDependence() const
Return true if the action has a host dependence.
Definition Action.cpp:286
static bool classof(const Action *A)
Definition Action.h:400
llvm::function_ref< void(Action *, const ToolChain *, BoundArch)> OffloadActionWorkTy
Definition Action.h:353
void doOnHostDependence(const OffloadActionWorkTy &Work) const
Execute the work specified in Work on the host dependence.
Definition Action.cpp:243
OffloadAction(const HostDependence &HDep)
Definition Action.cpp:191
static bool classof(const Action *A)
Definition Action.h:584
OffloadBundlingJobAction(ActionList &Inputs)
Definition Action.cpp:430
OffloadPackagerJobAction(ActionList &Inputs, types::ID Type)
Definition Action.cpp:435
static bool classof(const Action *A)
Definition Action.h:595
static bool classof(const Action *A)
Definition Action.h:437
PrecompileJobAction(ActionClass Kind, Action *Input, types::ID OutputType)
Definition Action.cpp:357
static bool classof(const Action *A)
Definition Action.h:423
PreprocessJobAction(Action *Input, types::ID OutputType)
Definition Action.cpp:349
StaticLibJobAction(ActionList &Inputs, types::ID Type)
Definition Action.cpp:447
static bool classof(const Action *A)
Definition Action.h:617
ToolChain - Access to tools for a single platform.
Definition ToolChain.h:96
VerifyDebugInfoJobAction(Action *Input, types::ID Type)
Definition Action.cpp:419
static bool classof(const Action *A)
Definition Action.h:561
VerifyJobAction(ActionClass Kind, Action *Input, types::ID Type)
Definition Action.cpp:410
static bool classof(const Action *A)
Definition Action.h:549
static bool classof(const Action *A)
Definition Action.h:572
VerifyPCHJobAction(Action *Input, types::ID Type)
Definition Action.cpp:425
SmallVector< Action *, 3 > ActionList
ActionList - Type used for lists of actions.
Definition Util.h:25
Top level wrappers for InstallAPI frontend operations.
Diagnostic wrappers for TextAPI types for error reporting.
Definition Dominators.h:30
Represents a bound architecture for offload / multiple architecture compilation.