-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIR][OpenMP] Initial commit for OpenMP support in CIR (#382)
This patch introduces initial support for: ``` pragma omp parallel ``` This patch doesn't add support for any of the `parallel` clauses, including variable privatization; thus, all variables are handled as shared. This PR fixes issue #285.
- Loading branch information
Showing
21 changed files
with
359 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
//===--- CIRGenStmtOpenMP.cpp - Interface to OpenMP Runtimes --------------===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This provides a class for OpenMP runtime MLIR code generation. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "CIRGenOpenMPRuntime.h" | ||
#include "CIRGenFunction.h" | ||
#include "CIRGenModule.h" | ||
|
||
using namespace cir; | ||
using namespace clang; | ||
|
||
CIRGenOpenMPRuntime::CIRGenOpenMPRuntime(CIRGenModule &CGM) : CGM(CGM) {} | ||
|
||
Address CIRGenOpenMPRuntime::getAddressOfLocalVariable(CIRGenFunction &CGF, | ||
const VarDecl *VD) { | ||
assert(!UnimplementedFeature::openMPRuntime()); | ||
return Address::invalid(); | ||
} | ||
|
||
void CIRGenOpenMPRuntime::checkAndEmitLastprivateConditional( | ||
CIRGenFunction &CGF, const Expr *LHS) { | ||
assert(!UnimplementedFeature::openMPRuntime()); | ||
return; | ||
} | ||
|
||
void CIRGenOpenMPRuntime::registerTargetGlobalVariable( | ||
const clang::VarDecl *VD, mlir::cir::GlobalOp globalOp) { | ||
assert(!UnimplementedFeature::openMPRuntime()); | ||
return; | ||
} | ||
|
||
void CIRGenOpenMPRuntime::emitDeferredTargetDecls() const { | ||
assert(!UnimplementedFeature::openMPRuntime()); | ||
return; | ||
} | ||
|
||
void CIRGenOpenMPRuntime::emitFunctionProlog(CIRGenFunction &CGF, | ||
const clang::Decl *D) { | ||
assert(!UnimplementedFeature::openMPRuntime()); | ||
return; | ||
} | ||
|
||
bool CIRGenOpenMPRuntime::emitTargetGlobal(clang::GlobalDecl &GD) { | ||
assert(!UnimplementedFeature::openMPRuntime()); | ||
return false; | ||
} |
Oops, something went wrong.