Merge pull request #1110 from emankov/master

[HIPIFY][fix][#1109] Do not preserve extern __shared__ for IncompleteArrayType

[ROCm/hip commit: 84a42e1769]
이 커밋은 다음에 포함됨:
Evgeny Mankov 작성하고 GitHub가 2019-05-15 20:09:00 +03:00를 커밋함
커밋 946281504d
3 파일이 변경됨
+4 -1

검색과 일치하는 파일 없음

+1 -1
파일 보기
@@ -352,7 +352,7 @@ bool HipifyAction::cudaSharedIncompleteArrayVar(const clang::ast_matchers::Match
}
if (!typeName.empty()) {
clang::SourceLocation slStart = llcompat::getBeginLoc(sharedVar->getTypeSourceInfo()->getTypeLoc());
clang::SourceLocation slStart = sharedVar->getOuterLocStart();
clang::SourceLocation slEnd = llcompat::getEndLoc(sharedVar->getTypeSourceInfo()->getTypeLoc());
clang::SourceManager* SM = Result.SourceManager;
size_t repLength = SM->getCharacterData(slEnd) - SM->getCharacterData(slStart) + 1;
+1
파일 보기
@@ -9,6 +9,7 @@
__global__ void dynamicReverse(int *d, int n)
{
// Dynamic shared memory
// CHECK-NOT: extern __shared__
// CHECK: HIP_DYNAMIC_SHARED(int, s);
extern __shared__ int s[];
int t = threadIdx.x;
+2
파일 보기
@@ -8,6 +8,8 @@
__global__ void staticReverse(int *d, int n)
{
// CHECK-NOT: HIP_DYNAMIC_SHARED(int, s);
// CHECK: __shared__ int s[64];
__shared__ int s[64];
int t = threadIdx.x;
int tr = n-t-1;