[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-07-20 Thread Ryan Prichard via Phabricator via cfe-commits
rprichard abandoned this revision. rprichard added a comment. Abandoning this patch because D127465 is a better fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127267/new/ https://reviews.llvm.org/D127267 ___

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-09 Thread Ryan Prichard via Phabricator via cfe-commits
rprichard added a comment. I uploaded D127465 , weakening the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127267/new/ https://reviews.llvm.org/D127267 ___ cfe-co

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-09 Thread Ryan Prichard via Phabricator via cfe-commits
rprichard added a subscriber: jlebar. rprichard added a comment. Ok, I can upload a patch omitting `*_ATOMIC_LLONG_LOCK_FREE` from the macro testing. FWIW, did you see this comment in clang/lib/Basic/Targets/NVPTX.cpp?: // This is a bit of a lie, but it controls __GCC_ATOMIC_XXX_LOCK_FREE, an

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I think the root cause of the problem here is that CUDA compilation assumes that the GPU-side looks identical to the host side of the compilation. The test was intended to verify that and, AFAICT, it did its job flagging the issue here. AFAICT, __GCC_ATOMIC_LLONG_LOCK_FREE=

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-09 Thread Ryan Prichard via Phabricator via cfe-commits
rprichard added a comment. In D127267#3570269 , @yaxunl wrote: > This patch is to fix an issue, right? At least we need a test to prevent that > issue from happening again. Yes, this patch is necessary to keep the clang/test/Preprocessor/cuda-types.cu

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. This patch is to fix an issue, right? At least we need a test to prevent that issue from happening again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127267/new/ https://reviews.llvm.org/D127267 _

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-08 Thread Ryan Prichard via Phabricator via cfe-commits
rprichard added a comment. In D127267#3568388 , @rprichard wrote: > Aside: There are only two calls to AllocateTarget: one in > TargetInfo::CreateTargetInfo and one in NVPTXTargetInfo::NVPTXTargetInfo. > This change removes NVPTXTargetInfo's call. Ther

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-08 Thread Ryan Prichard via Phabricator via cfe-commits
rprichard added a comment. I don't expect this change to affect the compiler behavior by itself -- is there a particular test that should be written? The code that I'm moving into NVPTXTargetInfo::setAuxTarget is already tested via clang/test/Preprocessor/cuda-types.cu. Aside: There are only t

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. need a test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127267/new/ https://reviews.llvm.org/D127267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-07 Thread Ryan Prichard via Phabricator via cfe-commits
rprichard added a comment. This change is needed for D28213 , so that the `__GCC_ATOMIC_LLONG_LOCK_FREE` macro matches for `-target i386-unknown-linux-gnu` between `--cuda-host-only` and `--cuda-device-only`. This is tested in clang/test/Preprocessor/cuda-types.

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-07 Thread Ryan Prichard via Phabricator via cfe-commits
rprichard created this revision. Herald added subscribers: jsji, kosarev, mattd, gchakrabarti, asavonic, kerbowa, pengfei, jvesely. Herald added a project: All. rprichard requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, jholewinski. Herald added a reviewer: jdoer