Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
//===-- examples/flang-omp-report-plugin/flang-omp-report-visitor.h -------===// | //===-- examples/flang-omp-report-plugin/flang-omp-report-visitor.h -------===// | ||||
Lint: Lint: clang-format not found in user’s local PATH; not linting file. | |||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#ifndef FORTRAN_FLANG_OMP_REPORT_VISITOR_H | #ifndef FORTRAN_FLANG_OMP_REPORT_VISITOR_H | ||||
#define FORTRAN_FLANG_OMP_REPORT_VISITOR_H | #define FORTRAN_FLANG_OMP_REPORT_VISITOR_H | ||||
#include "flang/Parser/parse-tree-visitor.h" | #include "flang/Parser/parse-tree-visitor.h" | ||||
#include "flang/Parser/parse-tree.h" | #include "flang/Parser/parse-tree.h" | ||||
#include "flang/Parser/parsing.h" | #include "flang/Parser/parsing.h" | ||||
#include "llvm/ADT/DenseMap.h" | |||||
#include "llvm/ADT/SmallVector.h" | #include "llvm/ADT/SmallVector.h" | ||||
#include <deque> | #include <deque> | ||||
#include <map> | |||||
#include <string> | #include <string> | ||||
namespace Fortran { | namespace Fortran { | ||||
namespace parser { | namespace parser { | ||||
struct ClauseInfo { | struct ClauseInfo { | ||||
std::string clause; | std::string clause; | ||||
std::string clauseDetails; | std::string clauseDetails; | ||||
ClauseInfo() {} | ClauseInfo() {} | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | struct OpenMPCounterVisitor { | ||||
void Post(const OmpScheduleClause::ScheduleType &c); | void Post(const OmpScheduleClause::ScheduleType &c); | ||||
void Post(const OmpIfClause::DirectiveNameModifier &c); | void Post(const OmpIfClause::DirectiveNameModifier &c); | ||||
void Post(const OmpCancelType::Type &c); | void Post(const OmpCancelType::Type &c); | ||||
void Post(const OmpClause &c); | void Post(const OmpClause &c); | ||||
void PostClauseCommon(const ClauseInfo &ci); | void PostClauseCommon(const ClauseInfo &ci); | ||||
void Post(const DoConstruct &); | void Post(const DoConstruct &); | ||||
std::string clauseDetails{""}; | std::string clauseDetails{""}; | ||||
std::map<std::pair<std::string, std::string>, int> constructClauseCount; | |||||
// curLoopLogRecord and loopLogRecordStack store | // curLoopLogRecord and loopLogRecordStack store | ||||
// pointers to this datastructure's entries. Hence a | // pointers to this datastructure's entries. Hence a | ||||
// vector cannot be used since pointers are invalidated | // vector cannot be used since pointers are invalidated | ||||
// on resize. Next best option seems to be deque. Also a | // on resize. Next best option seems to be deque. Also a | ||||
// list cannot be used since YAML gen requires a | // list cannot be used since YAML gen requires a | ||||
// datastructure which can be accessed through indices. | // datastructure which can be accessed through indices. | ||||
std::deque<LogRecord> constructClauses; | std::deque<LogRecord> constructClauses; | ||||
LogRecord *curLoopLogRecord{nullptr}; | LogRecord *curLoopLogRecord{nullptr}; | ||||
llvm::SmallVector<LogRecord *> loopLogRecordStack; | llvm::SmallVector<LogRecord *> loopLogRecordStack; | ||||
llvm::SmallVector<OmpWrapperType *> ompWrapperStack; | llvm::SmallVector<OmpWrapperType *> ompWrapperStack; | ||||
std::map<OmpWrapperType *, llvm::SmallVector<ClauseInfo>> clauseStrings; | llvm::DenseMap<OmpWrapperType *, llvm::SmallVector<ClauseInfo>> clauseStrings; | ||||
Parsing *parsing{nullptr}; | Parsing *parsing{nullptr}; | ||||
}; | }; | ||||
} // namespace parser | } // namespace parser | ||||
} // namespace Fortran | } // namespace Fortran | ||||
#endif /* FORTRAN_FLANG_OMP_REPORT_VISITOR_H */ | #endif /* FORTRAN_FLANG_OMP_REPORT_VISITOR_H */ |
clang-format not found in user’s local PATH; not linting file.