[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. PING Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-23 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 272621. hliao added a comment. Rebase to trunk. All prerequisites are landed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 Files: clang/test/CodeGenCUDA/amdgpu-kerne

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-23 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. ping for code review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-24 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu:62-64 +// OPT-NOT: alloca +// OPT-NOT: ptrtoint +// OPT-NOT: inttoptr arsenm wrote: > Positive checks are preferable (here an

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-24 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 273030. hliao added a comment. Add comments and enhance tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 Files: clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-t

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-24 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:237-239 + TTI->isNoopAddrSpaceCast( + P2I->getOperand(0)->getType()->getPointerAddressSpace(), + I2P->getType()->getP

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-24 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 273031. hliao added a comment. enhance test more. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 Files: clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu llvm

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-24 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 273147. hliao added a comment. Revise again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 Files: clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu llvm/lib/

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-24 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 273226. hliao added a comment. Rebase to the trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 Files: clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu ll

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-25 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. ping for code review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-25 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 273477. hliao added a comment. Revise Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 Files: clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu llvm/lib/Transfo

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-25 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 273524. hliao added a comment. Revie the grammar. s/is/as/ in the first sentence. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 Files: clang/test/CodeGenCUDA/amdgpu-k

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-25 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 273531. hliao added a comment. remove 'an' Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 Files: clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu llvm/lib/Tr

[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

2020-06-25 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdccfaacf93e1: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ h

[PATCH] D78655: [CUDA][HIP] Let non-caputuring lambda be host device

2020-06-26 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D78655#2117216 , @pfultz2 wrote: > > Now, back to the specifics of your example. I'm still not 100% sure I > > understand what the problem is. Can you boil down the use case to an > > example on godbolt? > > I dont have a specif

[PATCH] D82764: [NFC] Fixed ignored .hip test.

2020-06-29 Thread Michael Liao via Phabricator via cfe-commits
hliao accepted this revision. hliao added a comment. This revision is now accepted and ready to land. Thanks for catching that! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82764/new/ https://reviews.llvm.org/D82764

[PATCH] D78513: [hip] Claim builtin type `__float128` supported if the host target supports it.

2020-04-20 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl. Herald added subscribers: cfe-commits, kerbowa, nhaehnle, jvesely. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D78513 Files: clang/lib/Basic/Targets/AMDGPU.cpp clang/test/SemaCU

[PATCH] D78513: [hip] Claim builtin type `__float128` supported if the host target supports it.

2020-04-20 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D78513#1993115 , @yaxunl wrote: > Currently if instructions of float128 get to amdgpu backend, are we going to > crash? As `Float128Format` is re-defined as `double`, there won't be any issue in the backend. But, it won't func

[PATCH] D78513: [hip] Claim builtin type `__float128` supported if the host target supports it.

2020-04-21 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG86e3b735cd80: [hip] Claim builtin type `__float128` supported if the host target supports it. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D78655: [HIP] Let lambda be host device by default

2020-04-25 Thread Michael Liao via Phabricator via cfe-commits
hliao requested changes to this revision. hliao added a comment. This revision now requires changes to proceed. In D78655#1997491 , @tra wrote: > Summoning @rsmith as I'm sure that there are interesting corner cases in > lambda handling that we didn't con

[PATCH] D78655: [HIP] Let lambda be host device by default

2020-04-25 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/test/CodeGenCUDA/lambda.cu:83 +void test_resolve(void) { + test_resolve_helper([&](){ overloaded();}); +} We are allowing regular lambda to be used in the device functions. That should be explicitly marked by makin

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-04-29 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 261003. hliao added a comment. Rebase to trunk and resolve the conflict. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h clang/

[PATCH] D78655: [HIP] Let lambda be host device by default

2020-04-29 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D78655#2003837 , @yaxunl wrote: > In D78655#2003681 , @hliao wrote: > > > I though the goal of adding HD/D attributes for lambda is to make the > > static check easier as lambda used in de

[PATCH] D78655: [HIP] Let lambda be host device by default

2020-04-29 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D78655#2011823 , @pfultz2 wrote: > > says we capture host variable reference in a device lambda. > > Is that required to be an error? I know @AlexVlx added support to hcc at one > point to capture host variables by reference. So

[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-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] D85276: [PGO][CUDA][HIP] Skip generating profile on the device stub and wrong-side functions.

2020-08-05 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl, bogner. Herald added a project: clang. Herald added a subscriber: cfe-commits. hliao requested review of this revision. - Skip generating profile data on `__global__` function in the host compilation. It's a host-side stub function

[PATCH] D85276: [PGO][CUDA][HIP] Skip generating profile on the device stub and wrong-side functions.

2020-08-05 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/CodeGen/CodeGenPGO.cpp:839-840 + // Skip host-only functions in the CUDA device compilation and device-only + // functions in the host compilation. + if (CGM.getLangOpts().CUDA && tra wrote: > We will still

[PATCH] D85276: [PGO][CUDA][HIP] Skip generating profile on the device stub and wrong-side functions.

2020-08-06 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D85276#2200108 , @tra wrote: > In D85276#2199655 , @yaxunl wrote: > >> Do we need to disable pgo and coverage mapping for device compilation? Or it >> is already disabled? > > We already d

[PATCH] D85276: [PGO][CUDA][HIP] Skip generating profile on the device stub and wrong-side functions.

2020-08-06 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 283654. hliao added a comment. Revise the comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85276/new/ https://reviews.llvm.org/D85276 Files: clang/lib/CodeGen/CodeGenPGO.cpp clang/test/CodeGenCUDA/prof

[PATCH] D85276: [PGO][CUDA][HIP] Skip generating profile on the device stub and wrong-side functions.

2020-08-06 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/CodeGen/CodeGenPGO.cpp:839-840 + // Skip host-only functions in the CUDA device compilation and device-only + // functions in the host compilation. + if (CGM.getLangOpts().CUDA && tra wrote: > hliao wrote: >

[PATCH] D85276: [PGO][CUDA][HIP] Skip generating profile on the device stub and wrong-side functions.

2020-08-10 Thread Michael Liao via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc7b683c126b8: [PGO][CUDA][HIP] Skip generating profile on the device stub and wrong-side… (authored by hliao). Repository: rG LLVM Github Monorepo

[PATCH] D85276: [PGO][CUDA][HIP] Skip generating profile on the device stub and wrong-side functions.

2020-08-10 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/CodeGen/CodeGenPGO.cpp:839-840 + // Skip host-only functions in the CUDA device compilation and device-only + // functions in the host compilation. + if (CGM.getLangOpts().CUDA && tra wrote: > hliao wrote: >

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, rjmccall, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. hliao added a comment. That test code just passed compilation on clang trunk if only assembly code is generated, https://godbolt.org/z/XYjRcT. But NVCC

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. That test code just passed compilation on clang trunk if only assembly code is generated, https://godbolt.org/z/XYjRcT. But NVCC generates errors on all cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79344/new/ https:/

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 261904. hliao added a comment. Reformatting test code following pre-merge checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79344/new/ https://reviews.llvm.org/D79344 Files: clang/include/clang/Basic/Diagn

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D79344#2018561 , @tra wrote: > This has a good chance of breaking existing code. It would be great to add an > escape hatch option to revert to the old behavior if we run into problems. > The change is relatively simple, so reve

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/test/SemaCUDA/variable-target.cu:42 + return 0; +} yaxunl wrote: > we need to have a test to check captured local host variable is allowed in > device lambda. > > we need to

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/test/SemaCUDA/variable-target.cu:6 + +static int gvar; +// expected-note@-1{{'gvar' declared here}} tra wrote: > The current set of tests only verifies access of host variable

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/Sema/SemaCUDA.cpp:156 + if (VD->getType()->isCUDADeviceBuiltinSurfaceType() || + VD->getType()->isCUDADeviceBuiltinTextureType()) +return CFT_HostDevice; yaxunl w

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D79344#2018683 , @tra wrote: > In D79344#2018628 , @hliao wrote: > > > In D79344#2018561 , @tra wrote: > > > > > This has a good chance of breaking

[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] D79393: [clang][codegen] Refactor argument loading in function prolog. NFC.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: rjmccall, kerbowa, yaxunl. Herald added subscribers: cfe-commits, nhaehnle, jvesely. Herald added a project: clang. hliao abandoned this revision. - Skip copying function arguments and unnecessary casting by using them directly. [clang][codegen

[PATCH] D79394: [clang][codegen] Refactor argument loading in function prolog. NFC.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: rjmccall, kerbowa, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. hliao added a child revision: D79395: [clang][codegen] Hoist parameter attribute setting in function prolog.. - Skip copying function arguments and

[PATCH] D79395: [clang][codegen] Hoist parameter attribute setting in function prolog.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 262011. hliao added a comment. Add dependency. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79395/new/ https://reviews.llvm.org/D79395 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGenCUDA/amdgpu-kerne

[PATCH] D79395: [clang][codegen] Hoist parameter attribute setting in function prolog.

2020-05-04 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: rjmccall, kerbowa, yaxunl. Herald added subscribers: cfe-commits, nhaehnle, jvesely. Herald added a project: clang. hliao updated this revision to Diff 262011. hliao added a comment. hliao added a parent revision: D79394: [clang][codegen] Refactor

[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. 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 http

[PATCH] D79395: [clang][codegen] Hoist parameter attribute setting in function prolog.

2020-05-05 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9142c0b46bfe: [clang][codegen] Hoist parameter attribute setting in function prolog. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79395

[PATCH] D79394: [clang][codegen] Refactor argument loading in function prolog. NFC.

2020-05-05 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG276c8dde0b58: [clang][codegen] Refactor argument loading in function prolog. NFC. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79394/ne

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D79344#2026025 , @tra wrote: > We're calling `copysign( int, double)`. The standard library provides > `copysign(double, double)`, CUDA provides only `copysign(float, double)`. As > far as C++ is concerned, both require one typ

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D79344#2026180 , @tra wrote: > The problem is reproducible in upstream clang. Let's see if I can reduce it > to something simpler. I remembered found similar errors when the math part is refactored out into the current but, la

[PATCH] D79344: [cuda] Start diagnosing variables with bad target.

2020-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D79344#2026349 , @tra wrote: > Here's a slightly smaller variant which may be a good clue for tracking down > the root cause. This one fails with: > > var.cc:6:14: error: no matching function for call to 'copysign' > double

[PATCH] D80237: [hip] Ensure pointer in struct argument has proper `addrspacecast`.

2020-05-19 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: arsenm, tra, rjmccall, yaxunl. Herald added subscribers: cfe-commits, kerbowa, nhaehnle, wdng, jvesely. Herald added a project: clang. - In last https://reviews.llvm.org/D69826, generic pointers in struct/array types are also replaced with globa

[PATCH] D104904: [OpenMP][AMDGCN] Initial math headers support

2021-07-21 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. My local build failed due to regression failures. clang/test/Headers/openmp_device_math_isnan.cpp failed with the following errors on undeclared `fabs`. 1950 /home/michliao/working/llvm/llvm-project/clang/test/Headers/Inputs/include/cstdlib:29:31: error: use of undeclar

[PATCH] D66950: [SimplifyCFG] Skip sinking common lifetime markers of `alloca`.

2019-08-29 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 217901. hliao added a comment. Herald added subscribers: cfe-commits, erik.pilkington, mgorny. Herald added a project: clang. Revise `isLifeTimeMarker` following review comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D66950: [SimplifyCFG] Skip sinking common lifetime markers of `alloca`.

2019-08-29 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 217903. hliao added a comment. Typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66950/new/ https://reviews.llvm.org/D66950 Files: llvm/lib/Transforms/Utils/SimplifyCFG.cpp llvm/test/Transforms/SimplifyCFG/

[PATCH] D66950: [SimplifyCFG] Skip sinking common lifetime markers of `alloca`.

2019-08-29 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG001871dee8b1: [SimplifyCFG] Skip sinking common lifetime markers of `alloca`. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66950/new/

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-02 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 6 inline comments as done. hliao added a comment. refinements are made after comments from reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 _

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-02 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 235921. hliao added a comment. code refinement after reviewers' comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h clang

[PATCH] D87761: [clang][codegen] Skip adding default function attributes on intrinsics.

2020-09-16 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: rjmccall, tra, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. hliao requested review of this revision. - After loading builtin bitcode for linking, skip adding default function attributes on LLVM intrinsics as the

[PATCH] D87761: [clang][codegen] Skip adding default function attributes on intrinsics.

2020-09-16 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4d4f0922837d: [clang][codegen] Skip adding default function attributes on intrinsics. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8776

[PATCH] D87858: [hip] Add HIP scope atomic ops.

2020-09-17 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: yaxunl, b-sumner. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. hliao requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87858 Files: clang/include/clang/AST/Expr.h

[PATCH] D87858: [hip] Add HIP scope atomic ops.

2020-09-17 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. `singlethread` scope is added for completeness for the atomicity considering signal handling. It may not be applicable to GPU yet. We could simply ignore them in the late phases of the compiler. If desired, I may remove it as well. Repository: rG LLVM Github Monorepo

[PATCH] D87858: [hip] Add HIP scope atomic ops.

2020-09-17 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 292622. hliao added a comment. Revise formatting following the clang-format suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87858/new/ https://reviews.llvm.org/D87858 Files: clang/include/clang/AST/E

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-21 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D87972#2284096 , @lebedev.ri wrote: > In D87972#2284064 , @xbolva00 wrote: > >> In D87972#2284060 , @MaskRay wrote: >> >>> I have tested this patch

[PATCH] D88303: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-25 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: yaxunl. Herald added subscribers: cfe-commits, kerbowa, Anastasia, nhaehnle, jvesely. Herald added a project: clang. hliao requested review of this revision. - `-cl-fp32-correctly-rounded-divide-sqrt` is already handled in a per-instruction man

[PATCH] D88303: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-25 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 294307. hliao added a comment. Remove the irrelevant change on .clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88303/new/ https://reviews.llvm.org/D88303 Files: clang/lib/CodeGen/CGCall.cpp clan

[PATCH] D88303: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-28 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 294718. hliao added a comment. Split the original into 2. This is the first part, which add `correctly-rounded-device-sqrt-fp-math` for OpenCL only. The second part will remove that attribute annotating completely. Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D88424: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-28 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: bader, Anastasia, yaxunl. Herald added subscribers: cfe-commits, kerbowa, nhaehnle, jvesely. Herald added a project: clang. hliao requested review of this revision. - `-cl-fp32-correctly-rounded-divide-sqrt` is already handled in a per-instructi

[PATCH] D88303: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-28 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D88303#2298259 , @bader wrote: > Thanks! Part 2 is submitted @ https://reviews.llvm.org/D88424 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88303/new/ https://reviews.llvm.org/D8

[PATCH] D88303: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-28 Thread Michael Liao via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5dbf80cad955: [clang][codegen] Annotate `correctly-rounded-divide-sqrt-fp-math` fn-attr for… (authored by hliao). Repository: rG LLVM Github Monor

[PATCH] D88424: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-28 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 294745. hliao added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88424/new/ https://reviews.llvm.org/D88424 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGenOpenCL/amdgpu-attrs.cl c

[PATCH] D92893: [CUDA] Do not diagnose host/device variable access in dependent types.

2020-12-08 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. LGTM if there's a regression test available. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92893/new/ https://reviews.llvm.org/D92893 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D92893: [CUDA] Do not diagnose host/device variable access in dependent types.

2020-12-10 Thread Michael Liao via Phabricator via cfe-commits
hliao accepted this revision. hliao added a comment. This revision is now accepted and ready to land. LGTM if you revise the test based on Sam's suggestion on the test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92893/new/ https://reviews.l

[PATCH] D93587: [hip] Fix HIP version parsing.

2020-12-19 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: yaxunl, tra. Herald added subscribers: kerbowa, nhaehnle, jvesely. hliao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Need trimming before parsing major or minor version numbers. This

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl. hliao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - MSVC has different `` implementation which calls into functions declared in ``. Instead of through builtins or inline

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. Beyond the enabling of the compilation with `` on Windows, I really have the concern on the current approach supporting `` compilation in the device compilation. The device compilation should not relies on the host STL implementation. That results in inconsistent compilat

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 313116. hliao added a comment. Fix typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files: clang/lib/Headers/__clang_hip_runtime_wrapper.h clang/lib/Headers/cuda

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 313136. hliao added a comment. Fix typo again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files: clang/lib/Headers/__clang_hip_runtime_wrapper.h clang/lib/Header

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 313138. hliao added a comment. Fix license. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files: clang/lib/Headers/__clang_hip_runtime_wrapper.h clang/lib/Headers/c

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D93638#2466097 , @jdoerfert wrote: > Disclaimer: I request changes because of the next sentence, other than that I > have no objection but also cannot review this. > All `cuda_wrapper` headers say something about complex in the f

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 313199. hliao added a comment. These functions are pure C functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files: clang/lib/Headers/__clang_hip_runtime_wrappe

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 313211. hliao added a comment. Herald added a subscriber: mgorny. Fix the cmake to distribute that header wrapper. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files:

[PATCH] D89980: [hip] Remove kernel argument coercion.

2020-11-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D89980#2371850 , @arsenm wrote: > This should use byref, but I don't think this should come at the cost of the > promotion. I would still like to see this promotion occur for the in-memory > byref type Once we use `byref`, that

[PATCH] D89980: [hip] Remove kernel argument coercion.

2020-11-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D89980#2371966 , @arsenm wrote: > In D89980#2371952 , @hliao wrote: > >> In D89980#2371850 , @arsenm wrote: >> >>> This should use byref, but I don'

[PATCH] D90809: [amdgpu] Add `llvm.amdgcn.endpgm` support.

2020-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: b-sumner, tony-tye, rampitec, yaxunl. Herald added subscribers: llvm-commits, cfe-commits, kerbowa, hiraditya, t-tye, tpr, dstuttard, nhaehnle, jvesely, kzhuravl, arsenm. Herald added projects: clang, LLVM. hliao requested review of this revision

[PATCH] D90809: [amdgpu] Add `llvm.amdgcn.endpgm` support.

2020-11-05 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 303213. hliao added a comment. Add `IntrCold`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90809/new/ https://reviews.llvm.org/D90809 Files: clang/include/clang/Basic/BuiltinsAMDGPU.def clang/test/CodeGenC

[PATCH] D90809: [amdgpu] Add `llvm.amdgcn.endpgm` support.

2020-11-05 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: llvm/include/llvm/IR/IntrinsicsAMDGPU.td:1581 +def int_amdgcn_endpgm : GCCBuiltin<"__builtin_amdgcn_endpgm">, + Intrinsic<[], [], [IntrNoReturn, IntrNoMem, IntrHasSideEffects] +>; r

[PATCH] D90809: [amdgpu] Add `llvm.amdgcn.endpgm` support.

2020-11-05 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added a comment. In D90809#2377083 , @rampitec wrote: > In D90809#2376994 , @b-sumner wrote: > >> Should this also be IntrConvergent? > > Probably yes... This is control

[PATCH] D90809: [amdgpu] Add `llvm.amdgcn.endpgm` support.

2020-11-05 Thread Michael Liao via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG23c6d1501d80: [amdgpu] Add `llvm.amdgcn.endpgm` support. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D89980: [hip] Remove kernel argument coercion.

2020-11-10 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 304181. hliao added a comment. Remove aggregate kernel argument coercion only. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89980/new/ https://reviews.llvm.org/D89980 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D89980: [hip] Remove kernel argument coercion.

2020-11-10 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 304182. hliao added a comment. Revise the commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89980/new/ https://reviews.llvm.org/D89980 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGenCU

[PATCH] D89980: [hip] Remove the coercion on aggregate kernel arguments.

2020-11-11 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. PING for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89980/new/ https://reviews.llvm.org/D89980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D89980: [hip] Remove the coercion on aggregate kernel arguments.

2020-11-12 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu:55 struct S { int *x; arsenm wrote: > Should also have a case with a single element struct, which will be treated > li

[PATCH] D89980: [hip] Remove the coercion on aggregate kernel arguments.

2020-11-12 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 304969. hliao added a comment. Add a test case for the single element struct. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89980/new/ https://reviews.llvm.org/D89980 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D89980: [hip] Remove the coercion on aggregate kernel arguments.

2020-11-12 Thread Michael Liao via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. hliao marked an inline comment as done. Closed by commit rG8920ef06a138: [hip] Remove the coercion on aggregate kernel arguments. (authored by hliao). Repository: rG

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-13 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 305154. hliao added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Add a note in the AMDGPU usage document on the assumption made here. - Revise the test in clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-13 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:227 + Optional getAssumedAddrSpace(const Value *V) const { +return getTLI()->getTargetMachine().getAssumedAddrSpace(V); hliao wrote: > arsenm wrote: > > We already have a -1

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-13 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 305203. hliao added a comment. Revise the condition check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91121/new/ https://reviews.llvm.org/D91121 Files: clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-13 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:533 + auto *Ty = V->getType(); + if (!Ty->isPointerTy() || + Ty->getPointerAddressSpace() != AMDGPUAS::FLAT_ADDRESS) arsenm wrot

<    1   2   3   4   5   6   >