clang: lib/AST/OpenACCClause.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

17

18using namespace clang;

19

24}

30}

44}

47}

55}

61 void *Mem =

63

65}

66

70 Expr *ConditionExpr,

73 return new (Mem) OpenACCIfClause(BeginLoc, LParenLoc, ConditionExpr, EndLoc);

74}

75

80 ConditionExpr, EndLoc) {

81 assert(ConditionExpr && "if clause requires condition expr");

84 "Condition expression type not scalar/dependent");

85}

86

90 Expr *ConditionExpr,

92 void *Mem = C.Allocate(OpenACCSelfClause::totalSizeToAlloc<Expr *>(1));

93 return new (Mem)

95}

96

102 void *Mem =

103 C.Allocate(OpenACCSelfClause::totalSizeToAlloc<Expr *>(VarList.size()));

104 return new (Mem) OpenACCSelfClause(BeginLoc, LParenLoc, VarList, EndLoc);

105}

106

107OpenACCSelfClause::OpenACCSelfClause(SourceLocation BeginLoc,

112 EndLoc),

113 HasConditionExpr(std::nullopt), NumExprs(VarList.size()) {

114 std::uninitialized_copy(VarList.begin(), VarList.end(),

115 getTrailingObjects<Expr *>());

116}

117

118OpenACCSelfClause::OpenACCSelfClause(SourceLocation BeginLoc,

122 EndLoc),

123 HasConditionExpr(ConditionExpr != nullptr), NumExprs(1) {

126 "Condition expression type not scalar/dependent");

127 std::uninitialized_copy(&ConditionExpr, &ConditionExpr + 1,

128 getTrailingObjects<Expr *>());

129}

130

133 default:

134 assert(false && "Clause children function not implemented");

135 break;

136#define VISIT_CLAUSE(CLAUSE_NAME) \

137 case OpenACCClauseKind::CLAUSE_NAME: \

138 return cast<OpenACC##CLAUSE_NAME##Clause>(this)->children();

139#define CLAUSE_ALIAS(ALIAS_NAME, CLAUSE_NAME, DEPRECATED) \

140 case OpenACCClauseKind::ALIAS_NAME: \

141 return cast<OpenACC##CLAUSE_NAME##Clause>(this)->children();

142

143#include "clang/Basic/OpenACCClauses.def"

144 }

146}

147

148OpenACCNumWorkersClause::OpenACCNumWorkersClause(SourceLocation BeginLoc,

150 Expr *IntExpr,

153 LParenLoc, IntExpr, EndLoc) {

156 "Condition expression type not scalar/dependent");

157}

158

165 EndLoc) {

166 assert(GangKinds.size() == IntExprs.size() && "Mismatch exprs/kind?");

167 std::uninitialized_copy(IntExprs.begin(), IntExprs.end(),

168 getTrailingObjects<Expr *>());

170 std::uninitialized_copy(GangKinds.begin(), GangKinds.end(),

171 getTrailingObjects());

172}

173

180 return new (Mem)

182}

183

184OpenACCCollapseClause::OpenACCCollapseClause(SourceLocation BeginLoc,

186 bool HasForce, Expr *LoopCount,

189 LParenLoc, LoopCount, EndLoc),

190 HasForce(HasForce) {

191 assert(LoopCount && "LoopCount required");

192}

193

198 assert(

199 LoopCount &&

201 "Loop count not constant expression");

202 void *Mem =

204 return new (Mem)

206}

207

208OpenACCVectorLengthClause::OpenACCVectorLengthClause(SourceLocation BeginLoc,

210 Expr *IntExpr,

213 LParenLoc, IntExpr, EndLoc) {

216 "Condition expression type not scalar/dependent");

217}

218

225 return new (Mem)

227}

228

229OpenACCAsyncClause::OpenACCAsyncClause(SourceLocation BeginLoc,

233 LParenLoc, IntExpr, EndLoc) {

236 "Condition expression type not scalar/dependent");

237}

238

242 Expr *IntExpr,

244 void *Mem =

246 return new (Mem) OpenACCAsyncClause(BeginLoc, LParenLoc, IntExpr, EndLoc);

247}

248

249OpenACCDeviceNumClause::OpenACCDeviceNumClause(SourceLocation BeginLoc,

253 LParenLoc, IntExpr, EndLoc) {

256 "device_num expression type not scalar/dependent");

257}

258

262 Expr *IntExpr,

264 void *Mem =

267}

268

269OpenACCDefaultAsyncClause::OpenACCDefaultAsyncClause(SourceLocation BeginLoc,

271 Expr *IntExpr,

274 LParenLoc, IntExpr, EndLoc) {

277 "default_async expression type not scalar/dependent");

278}

279

286 return new (Mem)

288}

289

294

295

296 void *Mem = C.Allocate(

297 OpenACCWaitClause::totalSizeToAlloc<Expr *>(QueueIdExprs.size() + 1));

298 return new (Mem) OpenACCWaitClause(BeginLoc, LParenLoc, DevNumExpr, QueuesLoc,

299 QueueIdExprs, EndLoc);

300}

301

307 void *Mem = C.Allocate(

308 OpenACCNumGangsClause::totalSizeToAlloc<Expr *>(IntExprs.size()));

310}

311

317 void *Mem =

318 C.Allocate(OpenACCTileClause::totalSizeToAlloc<Expr *>(SizeExprs.size()));

319 return new (Mem) OpenACCTileClause(BeginLoc, LParenLoc, SizeExprs, EndLoc);

320}

321

327 void *Mem = C.Allocate(

328 OpenACCPrivateClause::totalSizeToAlloc<Expr *>(VarList.size()));

330}

331

335 void *Mem = C.Allocate(

336 OpenACCFirstPrivateClause::totalSizeToAlloc<Expr *>(VarList.size()));

337 return new (Mem)

339}

340

346 void *Mem =

347 C.Allocate(OpenACCAttachClause::totalSizeToAlloc<Expr *>(VarList.size()));

348 return new (Mem) OpenACCAttachClause(BeginLoc, LParenLoc, VarList, EndLoc);

349}

350

356 void *Mem =

357 C.Allocate(OpenACCDetachClause::totalSizeToAlloc<Expr *>(VarList.size()));

358 return new (Mem) OpenACCDetachClause(BeginLoc, LParenLoc, VarList, EndLoc);

359}

360

366 void *Mem =

367 C.Allocate(OpenACCDeleteClause::totalSizeToAlloc<Expr *>(VarList.size()));

368 return new (Mem) OpenACCDeleteClause(BeginLoc, LParenLoc, VarList, EndLoc);

369}

370

376 void *Mem = C.Allocate(

377 OpenACCUseDeviceClause::totalSizeToAlloc<Expr *>(VarList.size()));

379}

380

386 void *Mem = C.Allocate(

387 OpenACCDevicePtrClause::totalSizeToAlloc<Expr *>(VarList.size()));

389}

390

396 void *Mem = C.Allocate(

397 OpenACCNoCreateClause::totalSizeToAlloc<Expr *>(VarList.size()));

399}

400

406 void *Mem = C.Allocate(

407 OpenACCPresentClause::totalSizeToAlloc<Expr *>(VarList.size()));

409}

410

416 void *Mem =

417 C.Allocate(OpenACCHostClause::totalSizeToAlloc<Expr *>(VarList.size()));

418 return new (Mem) OpenACCHostClause(BeginLoc, LParenLoc, VarList, EndLoc);

419}

420

426 void *Mem =

427 C.Allocate(OpenACCDeviceClause::totalSizeToAlloc<Expr *>(VarList.size()));

428 return new (Mem) OpenACCDeviceClause(BeginLoc, LParenLoc, VarList, EndLoc);

429}

430

435 void *Mem =

436 C.Allocate(OpenACCCopyClause::totalSizeToAlloc<Expr *>(VarList.size()));

437 return new (Mem)

438 OpenACCCopyClause(Spelling, BeginLoc, LParenLoc, VarList, EndLoc);

439}

440

446 void *Mem =

447 C.Allocate(OpenACCCopyInClause::totalSizeToAlloc<Expr *>(VarList.size()));

449 IsReadOnly, VarList, EndLoc);

450}

451

457 void *Mem = C.Allocate(

458 OpenACCCopyOutClause::totalSizeToAlloc<Expr *>(VarList.size()));

460 VarList, EndLoc);

461}

462

468 void *Mem =

469 C.Allocate(OpenACCCreateClause::totalSizeToAlloc<Expr *>(VarList.size()));

470 return new (Mem) OpenACCCreateClause(Spelling, BeginLoc, LParenLoc, IsZero,

471 VarList, EndLoc);

472}

473

478 void *Mem =

479 C.Allocate(OpenACCDeviceTypeClause::totalSizeToAlloc(

480 Archs.size()));

481 return new (Mem)

483}

484

489 void *Mem = C.Allocate(

490 OpenACCReductionClause::totalSizeToAlloc<Expr *>(VarList.size()));

491 return new (Mem)

493}

494

500}

501

507}

508

514}

515

521 void *Mem =

522 C.Allocate(OpenACCGangClause::totalSizeToAlloc<Expr *, OpenACCGangKind>(

523 IntExprs.size(), GangKinds.size()));

524 return new (Mem)

525 OpenACCGangClause(BeginLoc, LParenLoc, GangKinds, IntExprs, EndLoc);

526}

527

532 LParenLoc, IntExpr, EndLoc) {

535 "Int expression type not scalar/dependent");

536}

537

541 Expr *IntExpr,

543 void *Mem =

545 return new (Mem) OpenACCWorkerClause(BeginLoc, LParenLoc, IntExpr, EndLoc);

546}

547

552 LParenLoc, IntExpr, EndLoc) {

555 "Int expression type not scalar/dependent");

556}

557

561 Expr *IntExpr,

563 void *Mem =

565 return new (Mem) OpenACCVectorClause(BeginLoc, LParenLoc, IntExpr, EndLoc);

566}

567

571 void *Mem =

574}

575

582}

583

584

585

586

587

588void OpenACCClausePrinter::printExpr(const Expr *E) {

590}

591

593 OS << "default(" << C.getDefaultClauseKind() << ")";

594}

595

596void OpenACCClausePrinter::VisitIfClause(const OpenACCIfClause &C) {

597 OS << "if(";

598 printExpr(C.getConditionExpr());

599 OS << ")";

600}

601

602void OpenACCClausePrinter::VisitSelfClause(const OpenACCSelfClause &C) {

603 OS << "self";

604

605 if (C.isConditionExprClause()) {

606 if (const Expr *CondExpr = C.getConditionExpr()) {

607 OS << "(";

608 printExpr(CondExpr);

609 OS << ")";

610 }

611 } else {

612 OS << "(";

613 llvm::interleaveComma(C.getVarList(), OS,

614 [&](const Expr *E) { printExpr(E); });

615 OS << ")";

616 }

617}

618

620 OS << "num_gangs(";

621 llvm::interleaveComma(C.getIntExprs(), OS,

622 [&](const Expr *E) { printExpr(E); });

623 OS << ")";

624}

625

626void OpenACCClausePrinter::VisitTileClause(const OpenACCTileClause &C) {

627 OS << "tile(";

628 llvm::interleaveComma(C.getSizeExprs(), OS,

629 [&](const Expr *E) { printExpr(E); });

630 OS << ")";

631}

632

633void OpenACCClausePrinter::VisitNumWorkersClause(

635 OS << "num_workers(";

636 printExpr(C.getIntExpr());

637 OS << ")";

638}

639

640void OpenACCClausePrinter::VisitVectorLengthClause(

642 OS << "vector_length(";

643 printExpr(C.getIntExpr());

644 OS << ")";

645}

646

647void OpenACCClausePrinter::VisitDeviceNumClause(

649 OS << "device_num(";

650 printExpr(C.getIntExpr());

651 OS << ")";

652}

653

654void OpenACCClausePrinter::VisitDefaultAsyncClause(

656 OS << "default_async(";

657 printExpr(C.getIntExpr());

658 OS << ")";

659}

660

661void OpenACCClausePrinter::VisitAsyncClause(const OpenACCAsyncClause &C) {

662 OS << "async";

663 if (C.hasIntExpr()) {

664 OS << "(";

665 printExpr(C.getIntExpr());

666 OS << ")";

667 }

668}

669

671 OS << "private(";

672 llvm::interleaveComma(C.getVarList(), OS,

673 [&](const Expr *E) { printExpr(E); });

674 OS << ")";

675}

676

677void OpenACCClausePrinter::VisitFirstPrivateClause(

679 OS << "firstprivate(";

680 llvm::interleaveComma(C.getVarList(), OS,

681 [&](const Expr *E) { printExpr(E); });

682 OS << ")";

683}

684

686 OS << "attach(";

687 llvm::interleaveComma(C.getVarList(), OS,

688 [&](const Expr *E) { printExpr(E); });

689 OS << ")";

690}

691

693 OS << "detach(";

694 llvm::interleaveComma(C.getVarList(), OS,

695 [&](const Expr *E) { printExpr(E); });

696 OS << ")";

697}

698

700 OS << "delete(";

701 llvm::interleaveComma(C.getVarList(), OS,

702 [&](const Expr *E) { printExpr(E); });

703 OS << ")";

704}

705

706void OpenACCClausePrinter::VisitUseDeviceClause(

708 OS << "use_device(";

709 llvm::interleaveComma(C.getVarList(), OS,

710 [&](const Expr *E) { printExpr(E); });

711 OS << ")";

712}

713

714void OpenACCClausePrinter::VisitDevicePtrClause(

716 OS << "deviceptr(";

717 llvm::interleaveComma(C.getVarList(), OS,

718 [&](const Expr *E) { printExpr(E); });

719 OS << ")";

720}

721

723 OS << "no_create(";

724 llvm::interleaveComma(C.getVarList(), OS,

725 [&](const Expr *E) { printExpr(E); });

726 OS << ")";

727}

728

730 OS << "present(";

731 llvm::interleaveComma(C.getVarList(), OS,

732 [&](const Expr *E) { printExpr(E); });

733 OS << ")";

734}

735

736void OpenACCClausePrinter::VisitHostClause(const OpenACCHostClause &C) {

737 OS << "host(";

738 llvm::interleaveComma(C.getVarList(), OS,

739 [&](const Expr *E) { printExpr(E); });

740 OS << ")";

741}

742

744 OS << "device(";

745 llvm::interleaveComma(C.getVarList(), OS,

746 [&](const Expr *E) { printExpr(E); });

747 OS << ")";

748}

749

750void OpenACCClausePrinter::VisitCopyClause(const OpenACCCopyClause &C) {

751 OS << C.getClauseKind() << '(';

752 llvm::interleaveComma(C.getVarList(), OS,

753 [&](const Expr *E) { printExpr(E); });

754 OS << ")";

755}

756

758 OS << C.getClauseKind() << '(';

759 if (C.isReadOnly())

760 OS << "readonly: ";

761 llvm::interleaveComma(C.getVarList(), OS,

762 [&](const Expr *E) { printExpr(E); });

763 OS << ")";

764}

765

767 OS << C.getClauseKind() << '(';

768 if (C.isZero())

769 OS << "zero: ";

770 llvm::interleaveComma(C.getVarList(), OS,

771 [&](const Expr *E) { printExpr(E); });

772 OS << ")";

773}

774

776 OS << C.getClauseKind() << '(';

777 if (C.isZero())

778 OS << "zero: ";

779 llvm::interleaveComma(C.getVarList(), OS,

780 [&](const Expr *E) { printExpr(E); });

781 OS << ")";

782}

783

784void OpenACCClausePrinter::VisitReductionClause(

786 OS << "reduction(" << C.getReductionOp() << ": ";

787 llvm::interleaveComma(C.getVarList(), OS,

788 [&](const Expr *E) { printExpr(E); });

789 OS << ")";

790}

791

792void OpenACCClausePrinter::VisitWaitClause(const OpenACCWaitClause &C) {

793 OS << "wait";

794 if (C.getLParenLoc().isInvalid()) {

795 OS << "(";

796 if (C.hasDevNumExpr()) {

797 OS << "devnum: ";

798 printExpr(C.getDevNumExpr());

799 OS << " : ";

800 }

801

802 if (C.hasQueuesTag())

803 OS << "queues: ";

804

805 llvm::interleaveComma(C.getQueueIdExprs(), OS,

806 [&](const Expr *E) { printExpr(E); });

807 OS << ")";

808 }

809}

810

811void OpenACCClausePrinter::VisitDeviceTypeClause(

813 OS << C.getClauseKind();

814 OS << "(";

815 llvm::interleaveComma(C.getArchitectures(), OS,

817 if (Arch.first == nullptr)

818 OS << "*";

819 else

820 OS << Arch.first->getName();

821 });

822 OS << ")";

823}

824

825void OpenACCClausePrinter::VisitAutoClause(const OpenACCAutoClause &C) {

826 OS << "auto";

827}

828

829void OpenACCClausePrinter::VisitIndependentClause(

831 OS << "independent";

832}

833

834void OpenACCClausePrinter::VisitSeqClause(const OpenACCSeqClause &C) {

835 OS << "seq";

836}

837

839 OS << "collapse(";

840 if (C.hasForce())

841 OS << "force:";

842 printExpr(C.getLoopCount());

843 OS << ")";

844}

845

846void OpenACCClausePrinter::VisitGangClause(const OpenACCGangClause &C) {

847 OS << "gang";

848

849 if (C.getNumExprs() > 0) {

850 OS << "(";

851 bool first = true;

852 for (unsigned I = 0; I < C.getNumExprs(); ++I) {

853 if (!first)

854 OS << ", ";

855 first = false;

856

857 OS << C.getExpr(I).first << ": ";

858 printExpr(C.getExpr(I).second);

859 }

860 OS << ")";

861 }

862}

863

865 OS << "worker";

866

867 if (C.hasIntExpr()) {

868 OS << "(num: ";

869 printExpr(C.getIntExpr());

870 OS << ")";

871 }

872}

873

875 OS << "vector";

876

877 if (C.hasIntExpr()) {

878 OS << "(length: ";

879 printExpr(C.getIntExpr());

880 OS << ")";

881 }

882}

883

885 OS << "finalize";

886}

887

888void OpenACCClausePrinter::VisitIfPresentClause(

890 OS << "if_present";

891}

Defines the clang::ASTContext interface.

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...

This represents one expression.

bool isInstantiationDependent() const

Whether this expression is instantiation-dependent, meaning that it depends in some way on.

static bool classof(const OpenACCClause *C)

static OpenACCAsyncClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)

static OpenACCAttachClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCAutoClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)

Represents one of the handful of classes that has an optional/required 'condition' expression as an a...

static bool classof(const OpenACCClause *C)

Represents a clause that has one or more expressions associated with it.

static bool classof(const OpenACCClause *C)

void setExprs(MutableArrayRef< Expr * > NewExprs)

Used only for initialization, the leaf class can initialize this to trailing storage.

Represents a clause that has a list of parameters.

static bool classof(const OpenACCClause *C)

Represents one of a handful of clauses that have a single integer expression.

static bool classof(const OpenACCClause *C)

static bool classof(const OpenACCClause *C)

This is the base type for all OpenACC Clauses.

StmtIterator child_iterator

OpenACCClauseKind getClauseKind() const

llvm::iterator_range< child_iterator > child_range

Represents a 'collapse' clause on a 'loop' construct.

static OpenACCCollapseClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, bool HasForce, Expr *LoopCount, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCCopyClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static bool classof(const OpenACCClause *C)

static OpenACCCopyInClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, bool IsReadOnly, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCCopyOutClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, bool IsZero, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCCreateClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, bool IsZero, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCDefaultAsyncClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)

A 'default' clause, has the optional 'none' or 'present' argument.

static OpenACCDefaultClause * Create(const ASTContext &C, OpenACCDefaultClauseKind K, SourceLocation BeginLoc, SourceLocation LParenLoc, SourceLocation EndLoc)

static OpenACCDeleteClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCDetachClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static bool classof(const OpenACCClause *C)

static OpenACCDeviceClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static OpenACCDeviceNumClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCDevicePtrClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

A 'device_type' or 'dtype' clause, takes a list of either an 'asterisk' or an identifier.

static OpenACCDeviceTypeClause * Create(const ASTContext &C, OpenACCClauseKind K, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< DeviceTypeArgument > Archs, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCFinalizeClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)

static OpenACCFirstPrivateClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCGangClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< OpenACCGangKind > GangKinds, ArrayRef< Expr * > IntExprs, SourceLocation EndLoc)

OpenACCGangClause(SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< OpenACCGangKind > GangKinds, ArrayRef< Expr * > IntExprs, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCHostClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

An 'if' clause, which has a required condition expression.

OpenACCIfClause(SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *ConditionExpr, SourceLocation EndLoc)

static OpenACCIfClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *ConditionExpr, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCIfPresentClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)

static OpenACCIndependentClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCNoCreateClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static OpenACCNumGangsClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > IntExprs, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCNumWorkersClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static bool classof(const OpenACCClause *C)

static OpenACCPresentClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCPrivateClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCReductionClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCReductionOperator Operator, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

A 'self' clause, which has an optional condition expression, or, in the event of an 'update' directiv...

static bool classof(const OpenACCClause *C)

static OpenACCSelfClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *ConditionExpr, SourceLocation EndLoc)

static OpenACCSeqClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)

static OpenACCTileClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > SizeExprs, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCUseDeviceClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCVectorClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)

OpenACCVectorClause(SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCVectorLengthClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static OpenACCWaitClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *DevNumExpr, SourceLocation QueuesLoc, ArrayRef< Expr * > QueueIdExprs, SourceLocation EndLoc)

static bool classof(const OpenACCClause *C)

static bool classof(const OpenACCClause *C)

static OpenACCWorkerClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)

OpenACCWorkerClause(SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)

Encodes a location in the source.

void printPretty(raw_ostream &OS, PrinterHelper *Helper, const PrintingPolicy &Policy, unsigned Indentation=0, StringRef NewlineSymbol="\n", const ASTContext *Context=nullptr) const

bool isIntegerType() const

isIntegerType() does not include complex integers (a GCC extension).

bool isScalarType() const

The JSON file list parser is used to communicate input to InstallAPI.

OpenACCClauseKind

Represents the kind of an OpenACC clause.

@ Gang

'gang' clause, allowed on 'loop' and Combined constructs.

@ VectorLength

'vector_length' clause, allowed on 'parallel', 'kernels', 'parallel loop', and 'kernels loop' constru...

@ Async

'async' clause, allowed on Compute, Data, 'update', 'wait', and Combined constructs.

@ Collapse

'collapse' clause, allowed on 'loop' and Combined constructs.

@ DeviceNum

'device_num' clause, allowed on 'init', 'shutdown', and 'set' constructs.

@ Vector

'vector' clause, allowed on 'loop', Combined, and 'routine' directives.

@ Worker

'worker' clause, allowed on 'loop', Combined, and 'routine' directives.

@ DefaultAsync

'default_async' clause, allowed on 'set' construct.

@ If

'if' clause, allowed on all the Compute Constructs, Data Constructs, Executable Constructs,...

@ Self

'self' clause, allowed on Compute and Combined Constructs, plus 'update'.

@ NumWorkers

'num_workers' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs...

std::pair< IdentifierInfo *, SourceLocation > DeviceTypeArgument