Skip to content

Commit

Permalink
[CodeGen] modify white list for functions used by hipTF
Browse files Browse the repository at this point in the history
  • Loading branch information
whchung authored and scchan committed Jun 27, 2017
1 parent 29bf5b6 commit 707070d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/CodeGen/CodeGenModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2007,6 +2007,8 @@ static bool isWhiteListForHCC(CodeGenModule &CGM, GlobalDecl GD) {
// C++11 functional operators are allowed to pass
// C++11 swap functions are allowed to pass
// C++11 numeric limits are allowed to pass
// C++11 pair are allowed to pass
// C++11 complex are allowed to pass
// PSTL operators are allowed to pass
const CXXMethodDecl* MethodD = dyn_cast<CXXMethodDecl>(D);
if (MethodD) {
Expand All @@ -2018,13 +2020,17 @@ static bool isWhiteListForHCC(CodeGenModule &CGM, GlobalDecl GD) {
ClassName.find("unique_ptr") != StringRef::npos ||
ClassName.find("compressed_pair") != StringRef::npos ||
ClassName.find("numeric_limits") != StringRef::npos ||
ClassName.find("pair") != StringRef::npos ||
ClassName.find("complex") != StringRef::npos ||
MangledName.find("experimental8parallel") != StringRef::npos) {
return true;
}
}

// C++11 swap/move functions are allowed to pass
// C++11 memory_order modifiers are allowed to pass
// C++11 complex operators are allowed to pass
// certain C++11 math functions are allowed to pass
// Eigen internal functions are allowed to pass
const FunctionDecl* FuncD = dyn_cast<FunctionDecl>(D);
if (FuncD) {
Expand All @@ -2034,6 +2040,8 @@ static bool isWhiteListForHCC(CodeGenModule &CGM, GlobalDecl GD) {
MangledName.find("St12memory_order") != StringRef::npos ||
MangledName.find("Kokkos4Impl") != StringRef::npos ||
MangledName.find("St16initializer_list") != StringRef::npos ||
MangledName.find("St7complex") != StringRef::npos ||
MangledName.find("5roundf") != StringRef::npos ||
MangledName.find("Eigen8internal") != StringRef::npos) {
return true;
}
Expand Down

0 comments on commit 707070d

Please sign in to comment.