From 707070de98ec1c854616a7ff92aa96aedb926a0f Mon Sep 17 00:00:00 2001 From: "Wen-Heng (Jack) Chung" Date: Fri, 23 Jun 2017 22:59:19 +0000 Subject: [PATCH] [CodeGen] modify white list for functions used by hipTF --- lib/CodeGen/CodeGenModule.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 18ad61b33e4..c9754f9724e 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -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(D); if (MethodD) { @@ -2018,6 +2020,8 @@ 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; } @@ -2025,6 +2029,8 @@ static bool isWhiteListForHCC(CodeGenModule &CGM, GlobalDecl GD) { // 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(D); if (FuncD) { @@ -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; }