clang: include/clang/AST/StmtOpenACC.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CLANG_AST_STMTOPENACC_H

14#define LLVM_CLANG_AST_STMTOPENACC_H

15

20#include "llvm/ADT/STLExtras.h"

21#include

22

24

25

29

30

32

33

35

37

38

39

40

42

43protected:

47 : Stmt(SC), Kind(K), Range(Start, End), DirectiveLoc(DirectiveLoc) {}

48

49

50

52 assert(Clauses.empty() && "Cannot change clause list");

53 Clauses = NewClauses;

54 }

55

56public:

58

60 return S->getStmtClass() >= firstOpenACCConstructStmtConstant &&

61 S->getStmtClass() <= lastOpenACCConstructStmtConstant;

62 }

63

68

72

76};

77

78

79

80

85 Stmt *AssociatedStmt = nullptr;

86

87protected:

93 AssociatedStmt(AssocStmt) {}

94

101

102public:

106

109 return child_range(&AssociatedStmt, &AssociatedStmt + 1);

111 }

112

116};

117

118

119

120

121

122

123

124

125

126

127

128

131 private llvm::TrailingObjects<OpenACCComputeConstruct,

132 const OpenACCClause *> {

133 friend class ASTStmtWriter;

134 friend class ASTStmtReader;

136 friend TrailingObjects;

139 OpenACCComputeConstructClass, OpenACCDirectiveKind::Invalid,

140 SourceLocation{}, SourceLocation{}, SourceLocation{},

142

143

144

145 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

147 }

148

152 Stmt *StructuredBlock)

154 DirectiveLoc, End, StructuredBlock) {

156 "Only parallel, serial, and kernels constructs should be "

157 "represented by this type");

158

159

160 llvm::uninitialized_copy(Clauses, getTrailingObjects());

161

162 setClauseList(getTrailingObjects(Clauses.size()));

163 }

164

166

167public:

169 return T->getStmtClass() == OpenACCComputeConstructClass;

170 }

171

173 unsigned NumClauses);

178

182 }

183};

184

185

186

187class OpenACCLoopConstruct final

189 private llvm::TrailingObjects<OpenACCLoopConstruct,

190 const OpenACCClause *> {

191

192

193 OpenACCDirectiveKind ParentComputeConstructKind =

194 OpenACCDirectiveKind::Invalid;

195

202 friend TrailingObjects;

203

204 OpenACCLoopConstruct(unsigned NumClauses);

205

206 OpenACCLoopConstruct(OpenACCDirectiveKind ParentKind, SourceLocation Start,

207 SourceLocation DirLoc, SourceLocation End,

209

210public:

212 return T->getStmtClass() == OpenACCLoopConstructClass;

213 }

214

216 unsigned NumClauses);

217

220 SourceLocation BeginLoc, SourceLocation DirLoc, SourceLocation EndLoc,

222

223 Stmt *getLoop() { return getAssociatedStmt(); }

225 return const_cast<OpenACCLoopConstruct *>(this)->getLoop();

226 }

227

228

229

230

231

232

234 return ParentComputeConstructKind == OpenACCDirectiveKind::Invalid;

235 }

236

238 return ParentComputeConstructKind;

239 }

240};

241

242

243

244class OpenACCCombinedConstruct final

246 private llvm::TrailingObjects<OpenACCCombinedConstruct,

247 const OpenACCClause *> {

248 friend TrailingObjects;

249 OpenACCCombinedConstruct(unsigned NumClauses)

251 OpenACCCombinedConstructClass, OpenACCDirectiveKind::Invalid,

252 SourceLocation{}, SourceLocation{}, SourceLocation{},

253 nullptr) {

254 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

255 setClauseList(getTrailingObjects(NumClauses));

256 }

257

258 OpenACCCombinedConstruct(OpenACCDirectiveKind K, SourceLocation Start,

259 SourceLocation DirectiveLoc, SourceLocation End,

261 Stmt *StructuredBlock)

263 DirectiveLoc, End, StructuredBlock) {

264 assert(isOpenACCCombinedDirectiveKind(K) &&

265 "Only parallel loop, serial loop, and kernels loop constructs "

266 "should be represented by this type");

267

268 llvm::uninitialized_copy(Clauses, getTrailingObjects());

269 setClauseList(getTrailingObjects(Clauses.size()));

270 }

271 void setStructuredBlock(Stmt *S) { setAssociatedStmt(S); }

272

273public:

275 return T->getStmtClass() == OpenACCCombinedConstructClass;

276 }

277

279 unsigned NumClauses);

281 Create(const ASTContext &C, OpenACCDirectiveKind K, SourceLocation Start,

282 SourceLocation DirectiveLoc, SourceLocation End,

284 Stmt *getLoop() { return getAssociatedStmt(); }

286 return const_cast<OpenACCCombinedConstruct *>(this)->getLoop();

287 }

288};

289

290

291

292class OpenACCDataConstruct final

294 private llvm::TrailingObjects<OpenACCDataConstruct,

295 const OpenACCClause *> {

296 friend TrailingObjects;

297 OpenACCDataConstruct(unsigned NumClauses)

299 OpenACCDataConstructClass, OpenACCDirectiveKind::Data,

300 SourceLocation{}, SourceLocation{}, SourceLocation{},

301 nullptr) {

302 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

303 setClauseList(getTrailingObjects(NumClauses));

304 }

305

306 OpenACCDataConstruct(SourceLocation Start, SourceLocation DirectiveLoc,

307 SourceLocation End,

309 Stmt *StructuredBlock)

311 OpenACCDirectiveKind::Data, Start,

312 DirectiveLoc, End, StructuredBlock) {

313 llvm::uninitialized_copy(Clauses, getTrailingObjects());

314 setClauseList(getTrailingObjects(Clauses.size()));

315 }

316 void setStructuredBlock(Stmt *S) { setAssociatedStmt(S); }

317

318public:

320 return T->getStmtClass() == OpenACCDataConstructClass;

321 }

322

324 unsigned NumClauses);

326 SourceLocation DirectiveLoc,

327 SourceLocation End,

329 Stmt *StructuredBlock);

334};

335

336class OpenACCEnterDataConstruct final

338 private llvm::TrailingObjects<OpenACCEnterDataConstruct,

339 const OpenACCClause *> {

340 friend TrailingObjects;

341 OpenACCEnterDataConstruct(unsigned NumClauses)

343 OpenACCDirectiveKind::EnterData, SourceLocation{},

344 SourceLocation{}, SourceLocation{}) {

345 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

346 setClauseList(getTrailingObjects(NumClauses));

347 }

348 OpenACCEnterDataConstruct(SourceLocation Start, SourceLocation DirectiveLoc,

349 SourceLocation End,

352 OpenACCDirectiveKind::EnterData, Start,

353 DirectiveLoc, End) {

354 llvm::uninitialized_copy(Clauses, getTrailingObjects());

355 setClauseList(getTrailingObjects(Clauses.size()));

356 }

357

358public:

360 return T->getStmtClass() == OpenACCEnterDataConstructClass;

361 }

363 unsigned NumClauses);

365 Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc,

367};

368

369class OpenACCExitDataConstruct final

371 private llvm::TrailingObjects<OpenACCExitDataConstruct,

372 const OpenACCClause *> {

373 friend TrailingObjects;

374 OpenACCExitDataConstruct(unsigned NumClauses)

376 OpenACCDirectiveKind::ExitData, SourceLocation{},

377 SourceLocation{}, SourceLocation{}) {

378 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

379 setClauseList(getTrailingObjects(NumClauses));

380 }

381 OpenACCExitDataConstruct(SourceLocation Start, SourceLocation DirectiveLoc,

382 SourceLocation End,

385 OpenACCDirectiveKind::ExitData, Start,

386 DirectiveLoc, End) {

387 llvm::uninitialized_copy(Clauses, getTrailingObjects());

388 setClauseList(getTrailingObjects(Clauses.size()));

389 }

390

391public:

393 return T->getStmtClass() == OpenACCExitDataConstructClass;

394 }

396 unsigned NumClauses);

398 Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc,

400};

401

402

403class OpenACCHostDataConstruct final

405 private llvm::TrailingObjects<OpenACCHostDataConstruct,

406 const OpenACCClause *> {

407 friend TrailingObjects;

408 OpenACCHostDataConstruct(unsigned NumClauses)

410 OpenACCHostDataConstructClass, OpenACCDirectiveKind::HostData,

411 SourceLocation{}, SourceLocation{}, SourceLocation{},

412 nullptr) {

413 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

414 setClauseList(getTrailingObjects(NumClauses));

415 }

416 OpenACCHostDataConstruct(SourceLocation Start, SourceLocation DirectiveLoc,

417 SourceLocation End,

419 Stmt *StructuredBlock)

421 OpenACCDirectiveKind::HostData, Start,

422 DirectiveLoc, End, StructuredBlock) {

423 llvm::uninitialized_copy(Clauses, getTrailingObjects());

424 setClauseList(getTrailingObjects(Clauses.size()));

425 }

426 void setStructuredBlock(Stmt *S) { setAssociatedStmt(S); }

427

428public:

430 return T->getStmtClass() == OpenACCHostDataConstructClass;

431 }

433 unsigned NumClauses);

435 Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc,

437 Stmt *StructuredBlock);

442};

443

444

445

446class OpenACCWaitConstruct final

448 private llvm::TrailingObjects<OpenACCWaitConstruct, Expr *,

449 OpenACCClause *> {

450

451

452

453

454 friend TrailingObjects;

457

458

459 SourceLocation LParenLoc, RParenLoc;

460

461 SourceLocation QueuesLoc;

462

463

464

465 unsigned NumExprs = 0;

466

467 OpenACCWaitConstruct(unsigned NumExprs, unsigned NumClauses)

469 OpenACCDirectiveKind::Wait, SourceLocation{},

470 SourceLocation{}, SourceLocation{}),

471 NumExprs(NumExprs) {

472 assert(NumExprs >= 1 &&

473 "NumExprs should always be >= 1 because the 'devnum' "

474 "expr is represented by a null if necessary");

475 std::uninitialized_value_construct_n(getExprPtr(), NumExprs);

476 std::uninitialized_value_construct_n(getTrailingObjects<OpenACCClause *>(),

477 NumClauses);

478 setClauseList(MutableArrayRef(const_cast<const OpenACCClause **>(

479 getTrailingObjects<OpenACCClause *>()),

480 NumClauses));

481 }

482

484 SourceLocation LParenLoc, Expr *DevNumExpr,

486 SourceLocation RParenLoc, SourceLocation End,

489 OpenACCDirectiveKind::Wait, Start, DirectiveLoc,

490 End),

491 LParenLoc(LParenLoc), RParenLoc(RParenLoc), QueuesLoc(QueuesLoc),

492 NumExprs(QueueIdExprs.size() + 1) {

493 assert(NumExprs >= 1 &&

494 "NumExprs should always be >= 1 because the 'devnum' "

495 "expr is represented by a null if necessary");

496

497 llvm::uninitialized_copy(ArrayRef(DevNumExpr), getExprPtr());

498 llvm::uninitialized_copy(QueueIdExprs, getExprPtr() + 1);

499 std::uninitialized_copy(const_cast<OpenACCClause **>(Clauses.begin()),

500 const_cast<OpenACCClause **>(Clauses.end()),

501 getTrailingObjects<OpenACCClause *>());

502 setClauseList(MutableArrayRef(const_cast<const OpenACCClause **>(

503 getTrailingObjects<OpenACCClause *>()),

504 Clauses.size()));

505 }

506

507 size_t numTrailingObjects(OverloadToken<Expr *>) const { return NumExprs; }

508 size_t numTrailingObjects(OverloadToken<const OpenACCClause *>) const {

509 return clauses().size();

510 }

511

512 Expr **getExprPtr() const {

513 return const_cast<Expr**>(getTrailingObjects<Expr *>());

514 }

515

516 ArrayRef<Expr *> getExprs() const { return {getExprPtr(), NumExprs}; }

517

518 ArrayRef<Expr *> getExprs() { return {getExprPtr(), NumExprs}; }

519

520public:

522 return T->getStmtClass() == OpenACCWaitConstructClass;

523 }

524

527

529 Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc,

530 SourceLocation LParenLoc, Expr *DevNumExpr, SourceLocation QueuesLoc,

533

534 SourceLocation getLParenLoc() const { return LParenLoc; }

535 SourceLocation getRParenLoc() const { return RParenLoc; }

536 bool hasQueuesTag() const { return !QueuesLoc.isInvalid(); }

537 SourceLocation getQueuesLoc() const { return QueuesLoc; }

538

543

545 Stmt **Begin = reinterpret_cast<Stmt **>(getExprPtr());

546 return child_range(Begin, Begin + NumExprs);

547 }

548

550 Stmt *const *Begin =

551 reinterpret_cast<Stmt *const *>(getExprPtr());

552 return const_child_range(Begin, Begin + NumExprs);

553 }

554};

555

556class OpenACCCacheConstruct final

558 private llvm::TrailingObjects<OpenACCCacheConstruct, Expr *> {

559 friend TrailingObjects;

562

563

564 SourceRange ParensLoc;

565 SourceLocation ReadOnlyLoc;

566

567 unsigned NumVars = 0;

568

569 OpenACCCacheConstruct(unsigned NumVars)

571 OpenACCDirectiveKind::Cache, SourceLocation{},

572 SourceLocation{}, SourceLocation{}),

573 NumVars(NumVars) {

574 std::uninitialized_value_construct_n(getTrailingObjects(), NumVars);

575 }

577 SourceLocation LParenLoc, SourceLocation ReadOnlyLoc,

579 SourceLocation End)

581 OpenACCDirectiveKind::Cache, Start, DirectiveLoc,

582 End),

583 ParensLoc(LParenLoc, RParenLoc), ReadOnlyLoc(ReadOnlyLoc),

584 NumVars(VarList.size()) {

585

586 llvm::uninitialized_copy(VarList, getTrailingObjects());

587 }

588

589public:

591

592 MutableArrayRef<Expr *> getVarList() { return getTrailingObjects(NumVars); }

593

595 return T->getStmtClass() == OpenACCCacheConstructClass;

596 }

597

599 unsigned NumVars);

601 Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc,

602 SourceLocation LParenLoc, SourceLocation ReadOnlyLoc,

604 SourceLocation End);

605

606 SourceLocation getLParenLoc() const { return ParensLoc.getBegin(); }

607 SourceLocation getRParenLoc() const { return ParensLoc.getEnd(); }

608 bool hasReadOnly() const { return !ReadOnlyLoc.isInvalid(); }

610

612 Stmt **Begin = reinterpret_cast<Stmt **>(getTrailingObjects());

613 return child_range(Begin, Begin + NumVars);

614 }

615

617 Stmt *const *Begin = reinterpret_cast<Stmt *const *>(getTrailingObjects());

618 return const_child_range(Begin, Begin + NumVars);

619 }

620};

621

622

623class OpenACCInitConstruct final

625 private llvm::TrailingObjects<OpenACCInitConstruct,

626 const OpenACCClause *> {

627 friend TrailingObjects;

628 OpenACCInitConstruct(unsigned NumClauses)

630 OpenACCDirectiveKind::Init, SourceLocation{},

631 SourceLocation{}, SourceLocation{}) {

632 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

633 setClauseList(getTrailingObjects(NumClauses));

634 }

635 OpenACCInitConstruct(SourceLocation Start, SourceLocation DirectiveLoc,

636 SourceLocation End,

639 OpenACCDirectiveKind::Init, Start, DirectiveLoc,

640 End) {

641 llvm::uninitialized_copy(Clauses, getTrailingObjects());

642 setClauseList(getTrailingObjects(Clauses.size()));

643 }

644

645public:

647 return T->getStmtClass() == OpenACCInitConstructClass;

648 }

650 unsigned NumClauses);

652 SourceLocation DirectiveLoc,

653 SourceLocation End,

655};

656

657

658class OpenACCShutdownConstruct final

660 private llvm::TrailingObjects<OpenACCShutdownConstruct,

661 const OpenACCClause *> {

662 friend TrailingObjects;

663 OpenACCShutdownConstruct(unsigned NumClauses)

665 OpenACCDirectiveKind::Shutdown, SourceLocation{},

666 SourceLocation{}, SourceLocation{}) {

667 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

668 setClauseList(getTrailingObjects(NumClauses));

669 }

670 OpenACCShutdownConstruct(SourceLocation Start, SourceLocation DirectiveLoc,

671 SourceLocation End,

674 OpenACCDirectiveKind::Shutdown, Start,

675 DirectiveLoc, End) {

676 llvm::uninitialized_copy(Clauses, getTrailingObjects());

677 setClauseList(getTrailingObjects(Clauses.size()));

678 }

679

680public:

682 return T->getStmtClass() == OpenACCShutdownConstructClass;

683 }

685 unsigned NumClauses);

687 Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc,

689};

690

691

692class OpenACCSetConstruct final

694 private llvm::TrailingObjects<OpenACCSetConstruct,

695 const OpenACCClause *> {

696 friend TrailingObjects;

697 OpenACCSetConstruct(unsigned NumClauses)

699 OpenACCDirectiveKind::Set, SourceLocation{},

700 SourceLocation{}, SourceLocation{}) {

701 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

702 setClauseList(getTrailingObjects(NumClauses));

703 }

704

705 OpenACCSetConstruct(SourceLocation Start, SourceLocation DirectiveLoc,

706 SourceLocation End,

709 OpenACCDirectiveKind::Set, Start, DirectiveLoc,

710 End) {

711 llvm::uninitialized_copy(Clauses, getTrailingObjects());

712 setClauseList(getTrailingObjects(Clauses.size()));

713 }

714

715public:

717 return T->getStmtClass() == OpenACCSetConstructClass;

718 }

720 unsigned NumClauses);

722 SourceLocation DirectiveLoc,

723 SourceLocation End,

725};

726

727class OpenACCUpdateConstruct final

729 private llvm::TrailingObjects<OpenACCUpdateConstruct,

730 const OpenACCClause *> {

731 friend TrailingObjects;

732 OpenACCUpdateConstruct(unsigned NumClauses)

734 OpenACCDirectiveKind::Update, SourceLocation{},

735 SourceLocation{}, SourceLocation{}) {

736 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

737 setClauseList(getTrailingObjects(NumClauses));

738 }

739

740 OpenACCUpdateConstruct(SourceLocation Start, SourceLocation DirectiveLoc,

741 SourceLocation End,

744 OpenACCDirectiveKind::Update, Start, DirectiveLoc,

745 End) {

746 llvm::uninitialized_copy(Clauses, getTrailingObjects());

747 setClauseList(getTrailingObjects(Clauses.size()));

748 }

749

750public:

752 return T->getStmtClass() == OpenACCUpdateConstructClass;

753 }

755 unsigned NumClauses);

757 Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc,

759};

760

761

762

763class OpenACCAtomicConstruct final

765 private llvm::TrailingObjects<OpenACCAtomicConstruct,

766 const OpenACCClause *> {

767

769 friend TrailingObjects;

770 OpenACCAtomicKind AtomicKind = OpenACCAtomicKind::None;

771

772 OpenACCAtomicConstruct(unsigned NumClauses)

774 OpenACCAtomicConstructClass, OpenACCDirectiveKind::Atomic,

775 SourceLocation{}, SourceLocation{}, SourceLocation{},

776 nullptr) {

777 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);

778 setClauseList(getTrailingObjects(NumClauses));

779 }

780

782 OpenACCAtomicKind AtKind, SourceLocation End,

784 Stmt *AssociatedStmt)

786 OpenACCDirectiveKind::Atomic, Start,

787 DirectiveLoc, End, AssociatedStmt),

788 AtomicKind(AtKind) {

789

790 llvm::uninitialized_copy(Clauses, getTrailingObjects());

791

792 setClauseList(getTrailingObjects(Clauses.size()));

793 }

794

795 void setAssociatedStmt(Stmt *S) {

796 OpenACCAssociatedStmtConstruct::setAssociatedStmt(S);

797 }

798

799public:

801 return T->getStmtClass() == OpenACCAtomicConstructClass;

802 }

803

805 unsigned NumClauses);

807 Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc,

808 OpenACCAtomicKind AtKind, SourceLocation End,

810

811 OpenACCAtomicKind getAtomicKind() const { return AtomicKind; }

813 return OpenACCAssociatedStmtConstruct::getAssociatedStmt();

814 }

816 return OpenACCAssociatedStmtConstruct::getAssociatedStmt();

817 }

818

819

820

822

823

824

825

827 const Expr *V;

828 const Expr *X;

829

830

832

833

834

835

838 return {nullptr, nullptr, nullptr, nullptr, false};

839 }

840

842 const Expr *X) {

843 return {WholeExpr, V, X, nullptr};

844 }

850 bool PostfixIncDec) {

851 return {WholeExpr, nullptr, X, nullptr, PostfixIncDec};

852 }

853 };

854

879

880 const StmtInfo getAssociatedStmtInfo() const;

881};

882

883}

884#endif

Defines some OpenACC-specific enums and functions.

Defines the clang::SourceLocation class and associated facilities.

static OMPAtomicDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expressions Exprs)

Creates directive with a list of Clauses and 'x', 'v' and 'expr' parts of the atomic construct (see S...

static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)

Creates an empty directive with the place for NumClauses clauses.

TypePropertyCache< Private > Cache

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

Definition StmtOpenACC.h:766

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:800

const Stmt * getAssociatedStmt() const

Definition StmtOpenACC.h:812

Stmt * getAssociatedStmt()

Definition StmtOpenACC.h:815

friend class ASTStmtReader

Definition StmtOpenACC.h:768

OpenACCAtomicKind getAtomicKind() const

Definition StmtOpenACC.h:811

Definition StmtOpenACC.h:558

bool hasReadOnly() const

Definition StmtOpenACC.h:608

child_range children()

Definition StmtOpenACC.h:611

SourceLocation getLParenLoc() const

Definition StmtOpenACC.h:606

MutableArrayRef< Expr * > getVarList()

Definition StmtOpenACC.h:592

const_child_range children() const

Definition StmtOpenACC.h:616

ArrayRef< Expr * > getVarList() const

Definition StmtOpenACC.h:590

friend class ASTStmtWriter

Definition StmtOpenACC.h:560

friend class ASTStmtReader

Definition StmtOpenACC.h:561

SourceLocation getReadOnlyLoc() const

Definition StmtOpenACC.h:609

SourceLocation getRParenLoc() const

Definition StmtOpenACC.h:607

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:594

Definition StmtOpenACC.h:247

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:274

const Stmt * getLoop() const

Definition StmtOpenACC.h:285

Stmt * getLoop()

Definition StmtOpenACC.h:284

Definition StmtOpenACC.h:295

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:319

const Stmt * getStructuredBlock() const

Definition StmtOpenACC.h:331

Stmt * getStructuredBlock()

Definition StmtOpenACC.h:330

Definition StmtOpenACC.h:339

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:359

Definition StmtOpenACC.h:372

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:392

Definition StmtOpenACC.h:406

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:429

Stmt * getStructuredBlock()

Definition StmtOpenACC.h:438

const Stmt * getStructuredBlock() const

Definition StmtOpenACC.h:439

Definition StmtOpenACC.h:626

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:646

This class represents a 'loop' construct. The 'loop' construct applies to a 'for' loop (or range-for ...

Definition StmtOpenACC.h:190

bool isOrphanedLoopConstruct() const

OpenACC 3.3 2.9: An orphaned loop construct is a loop construct that is not lexically enclosed within...

Definition StmtOpenACC.h:233

friend class OpenACCCombinedConstruct

Definition StmtOpenACC.h:200

const Stmt * getLoop() const

Definition StmtOpenACC.h:224

OpenACCDirectiveKind getParentComputeConstructKind() const

Definition StmtOpenACC.h:237

friend class OpenACCComputeConstruct

Definition StmtOpenACC.h:201

friend class ASTContext

Definition StmtOpenACC.h:198

Stmt * getLoop()

Definition StmtOpenACC.h:223

friend class OpenACCAssociatedStmtConstruct

Definition StmtOpenACC.h:199

friend class ASTStmtWriter

Definition StmtOpenACC.h:196

friend class ASTStmtReader

Definition StmtOpenACC.h:197

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:211

Definition StmtOpenACC.h:695

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:716

Definition StmtOpenACC.h:661

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:681

Definition StmtOpenACC.h:730

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:751

Definition StmtOpenACC.h:449

bool hasQueuesTag() const

Definition StmtOpenACC.h:536

ArrayRef< Expr * > getQueueIdExprs()

Definition StmtOpenACC.h:541

SourceLocation getQueuesLoc() const

Definition StmtOpenACC.h:537

SourceLocation getRParenLoc() const

Definition StmtOpenACC.h:535

child_range children()

Definition StmtOpenACC.h:544

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:521

bool hasDevNumExpr() const

Definition StmtOpenACC.h:539

const_child_range children() const

Definition StmtOpenACC.h:549

friend class ASTStmtWriter

Definition StmtOpenACC.h:455

ArrayRef< Expr * > getQueueIdExprs() const

Definition StmtOpenACC.h:542

friend class ASTStmtReader

Definition StmtOpenACC.h:456

SourceLocation getLParenLoc() const

Definition StmtOpenACC.h:534

Expr * getDevNumExpr() const

Definition StmtOpenACC.h:540

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

This is a base class for any OpenACC statement-level constructs that have an associated statement.

Definition StmtOpenACC.h:81

void setAssociatedStmt(Stmt *S)

Definition StmtOpenACC.h:95

Stmt * getAssociatedStmt()

Definition StmtOpenACC.h:96

friend class RecursiveASTVisitor

Definition StmtOpenACC.h:84

const_child_range children() const

Definition StmtOpenACC.h:113

const Stmt * getAssociatedStmt() const

Definition StmtOpenACC.h:97

OpenACCAssociatedStmtConstruct(StmtClass SC, OpenACCDirectiveKind K, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, Stmt *AssocStmt)

Definition StmtOpenACC.h:88

friend class ASTStmtWriter

Definition StmtOpenACC.h:82

child_range children()

Definition StmtOpenACC.h:107

friend class ASTStmtReader

Definition StmtOpenACC.h:83

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:103

SourceLocation getEndLoc() const

Definition StmtOpenACC.h:65

SourceLocation getBeginLoc() const

Definition StmtOpenACC.h:64

OpenACCDirectiveKind getDirectiveKind() const

Definition StmtOpenACC.h:57

void setClauseList(MutableArrayRef< const OpenACCClause * > NewClauses)

Definition StmtOpenACC.h:51

ArrayRef< const OpenACCClause * > clauses() const

Definition StmtOpenACC.h:67

const_child_range children() const

Definition StmtOpenACC.h:73

SourceLocation getDirectiveLoc() const

Definition StmtOpenACC.h:66

friend class ASTStmtWriter

Definition StmtOpenACC.h:27

static bool classof(const Stmt *S)

Definition StmtOpenACC.h:59

child_range children()

Definition StmtOpenACC.h:69

friend class ASTStmtReader

Definition StmtOpenACC.h:28

OpenACCConstructStmt(StmtClass SC, OpenACCDirectiveKind K, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End)

Definition StmtOpenACC.h:44

Encodes a location in the source.

A trivial tuple used to represent a source range.

Stmt - This represents one statement.

StmtIterator child_iterator

Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...

StmtClass getStmtClass() const

Stmt(StmtClass SC, EmptyShell)

Construct an empty statement.

llvm::iterator_range< child_iterator > child_range

llvm::iterator_range< const_child_iterator > const_child_range

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

bool isOpenACCComputeDirectiveKind(OpenACCDirectiveKind K)

void setStructuredBlock(Stmt *S)

Definition StmtOpenACC.h:165

Stmt * getStructuredBlock()

Definition StmtOpenACC.h:179

static OpenACCComputeConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)

@ Create

'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...

nullptr

This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...

Definition StmtOpenACC.h:141

OpenACCComputeConstruct(OpenACCDirectiveKind K, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses, Stmt *StructuredBlock)

Definition StmtOpenACC.h:149

static bool classof(const Stmt *T)

Definition StmtOpenACC.h:168

const FunctionProtoType * T

setClauseList(getTrailingObjects(NumClauses))

Definition StmtOpenACC.h:821

static SingleStmtInfo createRead(const Expr *WholeExpr, const Expr *V, const Expr *X)

Definition StmtOpenACC.h:841

bool IsPostfixIncDec

Definition StmtOpenACC.h:836

const Expr * V

Definition StmtOpenACC.h:827

static SingleStmtInfo Empty()

Definition StmtOpenACC.h:837

const Expr * RefExpr

Definition StmtOpenACC.h:831

const Expr * WholeExpr

Definition StmtOpenACC.h:826

const Expr * X

Definition StmtOpenACC.h:828

static SingleStmtInfo createWrite(const Expr *WholeExpr, const Expr *X, const Expr *RefExpr)

Definition StmtOpenACC.h:845

static SingleStmtInfo createUpdate(const Expr *WholeExpr, const Expr *X, bool PostfixIncDec)

Definition StmtOpenACC.h:849

Definition StmtOpenACC.h:855

SingleStmtInfo Second

Definition StmtOpenACC.h:864

static StmtInfo createReadUpdate(SingleStmtInfo First, SingleStmtInfo Second)

Definition StmtOpenACC.h:874

SingleStmtInfo First

Definition StmtOpenACC.h:864

static StmtInfo createUpdateRead(SingleStmtInfo First, SingleStmtInfo Second)

Definition StmtOpenACC.h:866

static StmtInfo createReadWrite(SingleStmtInfo First, SingleStmtInfo Second)

Definition StmtOpenACC.h:870

StmtForm

Definition StmtOpenACC.h:856

@ Update

Definition StmtOpenACC.h:859

@ Write

Definition StmtOpenACC.h:858

@ ReadWrite

Definition StmtOpenACC.h:860

@ Read

Definition StmtOpenACC.h:857

@ UpdateRead

Definition StmtOpenACC.h:862

@ ReadUpdate

Definition StmtOpenACC.h:861