[PATCH] D88221: [flang][OpenMP] Parallel region codegen support
Sourabh Singh Tomar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 05:26:04 PDT 2020
SouraVX created this revision.
SouraVX added reviewers: schweitz, kiranchandramohan, kiranktp.
Herald added subscribers: llvm-commits, guansong, yaxunl.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
SouraVX requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
This patch reflects the work that can be upstreamed from PR(merged)
PR: https://github.com/flang-compiler/f18-llvm-project/pull/424
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88221
Files:
flang/lib/Lower/OpenMP.cpp
Index: flang/lib/Lower/OpenMP.cpp
===================================================================
--- flang/lib/Lower/OpenMP.cpp
+++ flang/lib/Lower/OpenMP.cpp
@@ -87,7 +87,6 @@
if (parallelDirective.v == llvm::omp::OMPD_parallel) {
auto &firOpBuilder = converter.getFirOpBuilder();
auto currentLocation = converter.getCurrentLocation();
- auto insertPt = firOpBuilder.saveInsertionPoint();
// Clauses.
// FIXME: Add support for other clauses.
@@ -117,7 +116,9 @@
firOpBuilder.setInsertionPointToStart(&block);
// Ensure the block is well-formed.
firOpBuilder.create<mlir::omp::TerminatorOp>(currentLocation);
- firOpBuilder.restoreInsertionPoint(insertPt);
+
+ // Place the insertion point to the start of the first block.
+ firOpBuilder.setInsertionPointToStart(&block);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88221.294026.patch
Type: text/x-patch
Size: 839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200924/d074c516/attachment.bin>
More information about the llvm-commits
mailing list