Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Differential D111977 Diff 380317 flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.cpp
Changeset View
Changeset View
Standalone View
Standalone View
flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.cpp
//===-- examples/flang-omp-report-plugin/flang-omp-report-visitor.cpp -----===// | //===-- examples/flang-omp-report-plugin/flang-omp-report-visitor.cpp -----===// | ||||
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 | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | void OpenMPCounterVisitor::PostClauseCommon(const ClauseInfo &ci) { | ||||
// the OpenMP construct for the loop construct. So the end loop is left | // the OpenMP construct for the loop construct. So the end loop is left | ||||
// hanging as a separate executable construct. If a nowait clause is seen in | // hanging as a separate executable construct. If a nowait clause is seen in | ||||
// an end loop construct we have to find the associated loop construct and | // an end loop construct we have to find the associated loop construct and | ||||
// add nowait to its list of clauses. Note: This is not a bug in flang, the | // add nowait to its list of clauses. Note: This is not a bug in flang, the | ||||
// parse tree is corrected during semantic analysis. | // parse tree is corrected during semantic analysis. | ||||
if (ci.clause == "nowait") { | if (ci.clause == "nowait") { | ||||
assert(curLoopLogRecord && | assert(curLoopLogRecord && | ||||
"loop Construct should be visited before a nowait clause"); | "loop Construct should be visited before a nowait clause"); | ||||
constructClauseCount[std::make_pair( | |||||
curLoopLogRecord->construct, ci.clause)]++; | |||||
curLoopLogRecord->clauses.push_back(ci); | curLoopLogRecord->clauses.push_back(ci); | ||||
} else { | } else { | ||||
assert(!ompWrapperStack.empty() && | assert(!ompWrapperStack.empty() && | ||||
"Construct should be visited before clause"); | "Construct should be visited before clause"); | ||||
constructClauseCount[std::make_pair( | |||||
getName(*ompWrapperStack.back()), ci.clause)]++; | |||||
clauseStrings[ompWrapperStack.back()].push_back(ci); | clauseStrings[ompWrapperStack.back()].push_back(ci); | ||||
} | } | ||||
} | } | ||||
void OpenMPCounterVisitor::Post(const DoConstruct &) { | void OpenMPCounterVisitor::Post(const DoConstruct &) { | ||||
curLoopLogRecord = loopLogRecordStack.back(); | curLoopLogRecord = loopLogRecordStack.back(); | ||||
loopLogRecordStack.pop_back(); | loopLogRecordStack.pop_back(); | ||||
} | } | ||||
} // namespace parser | } // namespace parser | ||||
} // namespace Fortran | } // namespace Fortran |
clang-format not found in user’s local PATH; not linting file.