[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-05-05 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. I hoisted parameter attributes preparation in D79395 , which depends on D79394 , a cleanup to make that hoist more straight-forward. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2556-2563 + // Restrict qualified HIP pointers that were coerced to global pointers + // can be marked with the noalias attribute. + if (isCoercedHIPGlobalPointer(*this, getLangOpts(), ArgI,

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-05-04 Thread Austin Kerbow via Phabricator via cfe-commits
kerbowa added a comment. In D79213#2018820 , @hliao wrote: > Any more comments? As this should be a performance-critical issue, shall we > get conclusion and make progress for the next step? We applied this current version of the patch internally for

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. Any more comments? As this should be a performance-critical issue, shall we get conclusion and make progress for the next step? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79213/new/ https://reviews.llvm.org/D79213

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-05-01 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2556-2563 + // Restrict qualified HIP pointers that were coerced to global pointers + // can be marked with the noalias attribute. + if (isCoercedHIPGlobalPointer(*this, getLangOpts(), ArgI, Ty)

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-05-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2556-2563 + // Restrict qualified HIP pointers that were coerced to global pointers + // can be marked with the noalias attribute. + if (isCoercedHIPGlobalPointer(*this, getLangOpts(), ArgI,

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-04-30 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. Basically, I think that should be a generic issue. As argument coercing doesn't handle pointer previously, we need to that address pointer-specific issue. That is, if the original argument has qualifiers being able to map onto LLVM attributes, the coerced argument should

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-04-30 Thread Austin Kerbow via Phabricator via cfe-commits
kerbowa added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2270 + CGF.ConvertType(Ty)->getPointerAddressSpace() == 0 && + ArgI.getCoerceToType()->getPointerElementType() == + CGF.ConvertType(Ty)->getPointerElementType();

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-04-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2270 + CGF.ConvertType(Ty)->getPointerAddressSpace() == 0 && + ArgI.getCoerceToType()->getPointerElementType() == + CGF.ConvertType(Ty)->getPointerElementType();

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-04-30 Thread Austin Kerbow via Phabricator via cfe-commits
kerbowa added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2270 + CGF.ConvertType(Ty)->getPointerAddressSpace() == 0 && + ArgI.getCoerceToType()->getPointerElementType() == + CGF.ConvertType(Ty)->getPointerElementType();

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-04-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2268 + return LangOpts.HIP && isa(ArgI.getCoerceToType()) && + ArgI.getCoerceToType()->getPointerAddressSpace() == 1 && + CGF.ConvertType(Ty)->getPointerAddressSpace() == 0 &&

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-04-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2267 + const ABIArgInfo , const QualType ) { + return LangOpts.HIP && isa(ArgI.getCoerceToType()) && + ArgI.getCoerceToType()->getPointerAddressSpace() == 1 &&

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-04-30 Thread Austin Kerbow via Phabricator via cfe-commits
kerbowa updated this revision to Diff 261388. kerbowa added a comment. Fix test formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79213/new/ https://reviews.llvm.org/D79213 Files: clang/lib/CodeGen/CGCall.cpp

[PATCH] D79213: [hip] Add noalias on restrict qualified coerced hip pointers

2020-04-30 Thread Austin Kerbow via Phabricator via cfe-commits
kerbowa created this revision. kerbowa added reviewers: yaxunl, hliao. Herald added subscribers: cfe-commits, nhaehnle, jvesely. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D79213 Files: clang/lib/CodeGen/CGCall.cpp