[clang][codegen] Hoist parameter attribute setting in function prolog.
authorMichael Liao <michael.hliao@gmail.com>
Tue, 5 May 2020 04:55:13 +0000 (00:55 -0400)
committerMichael Liao <michael.hliao@gmail.com>
Tue, 5 May 2020 19:31:51 +0000 (15:31 -0400)
commit9142c0b46bfea13d9348ab3d1d706a10ad9e5c8e
tree815717f34ae7c8c95f4874935a5575036cd6a87d
parent276c8dde0b58cfe29035448a27e16eff9fcf2a5a
[clang][codegen] Hoist parameter attribute setting in function prolog.

Summary:
- If the coerced type is still a pointer, it should be set with proper
  parameter attributes, such as `noalias`, `nonnull`, and etc. Hoist
  that (pointer) parameter attribute setting so that the coerced pointer
  parameter could be marked properly.

Depends on D79394

Reviewers: rjmccall, kerbowa, yaxunl

Subscribers: jvesely, nhaehnle, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79395
clang/lib/CodeGen/CGCall.cpp
clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu