[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 3 inline comments as done. jhuber6 added a comment. Here's the tests it fails, there might be a few that are wrong for reasons beyond the size_t stuff but it's hard to tell until that issue is resolved. The cuda test is just because I have CUDA set up incorrectly on my machine, li

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:483 +__OMP_RTL(__kmpc_push_num_teams, false, /* Void? */ Int32, IdentPtr, Int32, + Int32, Int32) For this one there's c

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 2 inline comments as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:203 + static Function *getOrCreateRuntimeFunction(Module &Md, + omp::RuntimeFunction FnID); --

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:244 -// TODO: Replace this with the real size_t type -#define __OMP_SIZE_TYPE(NAME) OMP_TYPE(NAME, Type::getInt64Ty(Ctx)) +#define __OMP_SIZE_TYPE

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 2 inline comments as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:245 +__OMP_PTR_TYPE(Int8PtrPtr, Int8Ptr) +__OMP_PTR_TYPE(Int8PtrPtrPtr, Int8PtrPtr) + I added these types as @fghanim suggested.

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 3 inline comments as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:250 +__OMP_SIZE_TYPE(SizeTy) +#undef __OMP_SIZE_TYPE + jdoerfert wrote: > Why the indirection via `__OMP_SIZE_TYPE`? Wouldn't `OMP_

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { jhuber6 wro

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { AndreyChurb

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { jdoerfert w

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { jdoerfert w

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { jdoerfert w

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { jhuber6 wro

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D80222#2060420 , @jdoerfert wrote: > Take a look at D80735 , it works fine for me > locally. Is that what you did? What problems do you observe now? That's pretty much what I did. If I kept in

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added a comment. Yes, this passed all the tests on my machine at least. Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:124 + return {FnTy, Fn}; +} } jdoerfert wrote: > Are you sure we need to

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D80222#2061810 , @jdoerfert wrote: > LGTM. Thanks for taking this one, it was more complex than I thought but it > is a really nice step in the right direction. I'll commit it for you soon if > you don't have access yet. Feel

[PATCH] D80735: [OpenMP][NFC] Reuse `llvm::omp::types::IdentPtr` in clang

2020-05-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:376 + /// generation. + llvm::OpenMPIRBuilder InternalOMPBuilder; Should D80222 be changed to use this instead and remove the static methods? Repository: rG LLVM Github Monorep

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D80222#2065141 , @jdoerfert wrote: > Initialize the internal OpenMPIRbuilder (see my patch). Isn't it initialized on line 1063 in `CGOpenMPRuntime.cpp`? There weren't any conflicts listed there when I merged your patch so it

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 278905. jhuber6 added a comment. Removed usage of alignment and deference attributes and changed several functions to use barrier attributes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81031/new/ https://re

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-17 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG09fe0c5ab9ca: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D81031?vs=278905&id=278908#toc Repository:

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D81031#2159796 , @leonardchan wrote: > In D81031#2159646 , @sstefan1 wrote: > > > Just in case you haven't seen already, > > `clang/test/OpenMP/barrier_codegen.cpp` needs to be updated a

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 278949. jhuber6 added a comment. Fixing errors caused by unused attribute sets. Adding missing attributes to barrier_codegen.cpp. Should I go ahead and commit this considering the previous was temporarily reverted? Or should I just wait a bit to see if it f

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D81031#2159943 , @jdoerfert wrote: > In D81031#2159895 , @jhuber6 wrote: > > > Fixing errors caused by unused attribute sets. Adding missing attributes to > > barrier_codegen.cpp. > > >

[PATCH] D80735: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang

2020-06-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I'm just investigating migrating D80222 away from the static methods. When I try to just add an OpenMPIRBuilder type and initialize it I get failures on the tests. I'm just adding in the module as you have `CGOpenMPRuntime.h` llvm::

[PATCH] D80735: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang

2020-06-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. The failure message is pretty much always this assertion as far as I can tell clang-11: /home/jhuber/Documents/llvm-project/llvm/lib/IR/Instructions.cpp:439: void llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef, llvm::ArrayRef >, const llvm::T

[PATCH] D80735: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang

2020-06-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Here's one of the stack traces. Calling `InternalOMPBuilder.initialize()` is what triggers it to start failing, which is confusing because all that function does is initialize the named types from OMPConstants, which should be working or else the old solution wouldn't w

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-06-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 270239. jhuber6 added a comment. Herald added subscribers: cfe-commits, aaron.ballman. Herald added a project: clang. Adding parameter and return attributes for pointers. There are some arguments I wasn't sure how they should be classified, like if every argu

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: jdoerfert. jhuber6 added projects: OpenMP, clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits, sstefan1. jhuber6 edited the summary of this revision. This patch changes Clang to generate runtime functions from the information

[PATCH] D131639: [OpenMP] Remove 'stdbool.h' from OpenMP header wrappers

2022-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 abandoned this revision. jhuber6 added a comment. In D131639#3755866 , @jdoerfert wrote: > I think the code as is upstream is fine. The test input is problematic. There > is no guarantee, or even any argument, that stdbool is not included by the

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 456441. jhuber6 added a comment. Updating. I realized all of the math-related ones are already covered by driver options for AMDGPU passing the appropriate fp contract to the frontend. This patch gets rid of most of that handling and just uses those directly

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9436 +CGM.getModule(), Type, true, +llvm::GlobalValue::LinkageTypes::LinkOnceODRLinkage, +llvm::ConstantInt::get(Type, Value), Name, nullptr, yaxunl wrote: > This

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9436 +CGM.getModule(), Type, true, +llvm::GlobalValue::LinkageTypes::LinkOnceODRLinkage, +llvm::ConstantInt::get(Type, Value), Name, nullptr, yaxunl wrote: > yaxun

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 456450. jhuber6 added a comment. Changing to private linkage. For OpenMP we could either make this use `weak_odr` so we have a single definition surviving until link time for us to use. Or we could change OpenMP to link in the bitcode libraries per-TU via `-m

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-08-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 456520. jhuber6 added a comment. Remove unused code gen option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130096/new/ https://reviews.llvm.org/D130096 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/l

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-08-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9436 +CGM.getModule(), Type, true, +llvm::GlobalValue::LinkageTypes::LinkOnceODRLinkage, +llvm::ConstantInt::get(Type, Value), Name, nullptr, yaxunl wrote: > jhube

[PATCH] D132689: [Object] Refactor code for extracting offload binaries

2022-09-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132689/new/ https://reviews.llvm.org/D132689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-09-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9436 +CGM.getModule(), Type, true, +llvm::GlobalValue::LinkageTypes::LinkOnceODRLinkage, +llvm::ConstantInt::get(Type, Value), Name, nullptr, yaxunl wrote: > jhube

[PATCH] D133133: [CUDA] Allow using -o with -fsyntax-only

2022-09-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. LG, thanks. Comment at: clang/lib/Driver/Driver.cpp:4555 else if (A->getKind() == Action::OffloadClass && - A->getType() == types::TY_Nothing) +

[PATCH] D133133: [CUDA] Allow using -o with -fsyntax-only

2022-09-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/Driver/cuda-bindings.cu:99 +// SYN-DAG: # "nvptx64-nvidia-cuda" - "clang", inputs: [{{.*}}], output: (nothing) // // Test two gpu architectures up to the assemble phase. tra wrote: > tra wrote: > > yaxunl w

[PATCH] D133161: [Clang] Fix the new driver crashing when using '-fsyntax-only'

2022-09-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, jdoerfert, JonChesterfield. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. The new driver currently crashses when a

[PATCH] D133161: [Clang] Fix the new driver crashing when using '-fsyntax-only'

2022-09-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D133161#3765469 , @tra wrote: > Does this patch obviate D133133 or is it > purely for the new driver functionality? If the intent of that patch was to prevent it from emitting an error with

[PATCH] D133161: [Clang] Fix the new driver crashing when using '-fsyntax-only'

2022-09-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4396-4398 + bool SingleDeviceOutput = !llvm::any_of(OffloadActions, [](Action *A) { +return A->getType() == types::TY_Nothing; + }) && isa(HostAction); tra wrote: > `any_of(A->getType()

[PATCH] D132689: [Object] Refactor code for extracting offload binaries

2022-09-06 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5dbc7cf7cac4: [Object] Refactor code for extracting offload binaries (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D132689?vs=455659&id=458162#toc Repository: rG LLVM Githu

[PATCH] D132607: [OffloadPackager] Add ability to extract images from other file types

2022-09-06 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa69404c0a294: [OffloadPackager] Add ability to extract images from other file types (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1326

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-09-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 458186. jhuber6 added a comment. Changing to `linkonce` linkage. According to the LLVM spec this should have the expected behaviour where a single definition is kept at link-time for each module. I tested this with a sample `HIP` program and it had the desired

[PATCH] D133367: [OpenMP] Remove use of removed '-f[no-]openmp-new-driver' flag

2022-09-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, ronlieb, tra, yaxunl. Herald added subscribers: kosarev, kerbowa, guansong, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, ss

[PATCH] D133367: [OpenMP] Remove use of removed '-f[no-]openmp-new-driver' flag

2022-09-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/Driver.cpp:3906 - (C.isOffloadingHostKind(Action::OFK_OpenMP) && - Args.hasFlag(options::OPT_fopenmp_new_driver, -options::OPT_no_offload_new_driver, true)) || tra wrote: >

[PATCH] D133367: [OpenMP] Remove use of removed '-f[no-]openmp-new-driver' flag

2022-09-06 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG57ef29f2835e: [OpenMP] Remove use of removed '-f[no-]openmp-new-driver' flag (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133367/new/

[PATCH] D133161: [Clang] Fix the new driver crashing when using '-fsyntax-only'

2022-09-06 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2753eafe5a7f: [Clang] Fix the new driver crashing when using '-fsyntax-only' (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D133161?vs=457419&id=458332#toc Repository: rG LL

[PATCH] D133539: [OpenMP] Replace OpenMP register requires constructor with a global array

2022-09-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, tianshilei1992, ABataev, ronlieb, doru1004, RaviNarayanaswamy. Herald added subscribers: guansong, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-comm

[PATCH] D133539: [OpenMP] Replace OpenMP register requires constructor with a global array

2022-09-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 458937. jhuber6 added a comment. Herald added subscribers: mattd, asavonic. Fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133539/new/ https://reviews.llvm.org/D133539 Files: clang/lib/CodeGen/CGOpe

[PATCH] D133539: [OpenMP] Replace OpenMP register requires constructor with a global array

2022-09-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 458948. jhuber6 added a comment. Fix LLVM test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133539/new/ https://reviews.llvm.org/D133539 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CGO

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, ronlieb, arsenm, yaxunl, tianshilei1992, ye-luo. Herald added subscribers: kosarev, kerbowa, guansong, t-tye, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. jhuber6 requested review of this revisi

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPUOpenMP.h:58 + llvm::SmallVector + getHIPDeviceLibs(const llvm::opt::ArgList &Args) const override; + JonChesterfield wrote: > Why hip device libs? There's a common set, plus a hip.bc p

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D133726#3785040 , @JonChesterfield wrote: > We can do this but should expect an increase in code size from having > multiple internalised copies of the same function. There may be an incidental > benefit if we can specialise

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 459716. jhuber6 added a comment. Renaming virtual function to make it more generic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133726/new/ https://reviews.llvm.org/D133726 Files: clang/include/clang/Drive

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 459721. jhuber6 added a comment. Adding a test for using `-nogpulib`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133726/new/ https://reviews.llvm.org/D133726 Files: clang/include/clang/Driver/ToolChain.h

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:717 AMDGPUToolChain::getGPUArch(const llvm::opt::ArgList &DriverArgs) const { - return getProcessorFromTargetID( - getTriple(), DriverArgs.getLastArgValue(options::OPT_mcpu_EQ)); + if (Drive

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D133726#3786607 , @arsenm wrote: > Does this fix the weird behavior where you needed to use -lm to use anything > in the device libraries? I don't see that being removed That was removed earlier when these files were just sen

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:717 AMDGPUToolChain::getGPUArch(const llvm::opt::ArgList &DriverArgs) const { - return getProcessorFromTargetID( - getTriple(), DriverArgs.getLastArgValue(options::OPT_mcpu_EQ)); + if (Drive

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 459786. jhuber6 added a comment. Removing use of `getGPUArch` and just using `-march` directly for OpenMP Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133726/new/ https://reviews.llvm.org/D133726 Files: cla

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:720-722 + if (DriverArgs.hasArg(options::OPT_march_EQ)) +return getProcessorFromTargetID( +getTriple(), DriverArgs.getLastArgValue(options::OPT_march_EQ)); yaxunl wrote

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 459848. jhuber6 added a comment. Removing old function update for 'mcpu' Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133726/new/ https://reviews.llvm.org/D133726 Files: clang/include/clang/Driver/ToolChain

[PATCH] D133802: [OpenMP] Remove simplified device runtime handling

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Driver/Options.td:2565-2566 Flags<[NoArgumentUnused, HelpHidden]>; -def fopenmp_cuda_force_full_runtime : Flag<["-"], "fopenmp-cuda-force-full-runtime">, Group, - Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;

[PATCH] D133802: [OpenMP] Remove simplified device runtime handling

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1048 CGBuilderTy &Bld = CGF.Builder; - OMPBuilder.createTargetDeinit(Bld, IsSPMD, requiresFullRuntime()); + OMPBuilder.createTargetDeinit(Bld, IsSPMD, true); } jdoerfert wro

[PATCH] D133802: [OpenMP] Remove simplified device runtime handling

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1048 CGBuilderTy &Bld = CGF.Builder; - OMPBuilder.createTargetDeinit(Bld, IsSPMD, requiresFullRuntime()); + OMPBuilder.createTargetDeinit(Bld, IsSPMD

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 459874. jhuber6 added a comment. Changing interface to `getAMDGPUDeviceLibs`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133726/new/ https://reviews.llvm.org/D133726 Files: clang/include/clang/Driver/Tool

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Driver/ToolChain.h:719 virtual llvm::SmallVector - getHIPDeviceLibs(const llvm::opt::ArgList &Args) const; + getAMDGPUDeviceLibs(const llvm::opt::ArgList &Args) const; yaxunl wrote: > well, HIP

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 459911. jhuber6 added a comment. Changing to `getDeviceLibs`. I suppose in the future we could make this work for CUDA, but for now it won't be defined for that toolchain so it's fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D133726: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU

2022-09-14 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG194ec844f5c6: [OpenMP][AMDGPU] Link bitcode ROCm device libraries per-TU (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133726/new/ ht

[PATCH] D128752: [CUDA] Stop adding CUDA features twice

2022-06-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tra, yaxunl. Herald added subscribers: mattd, carlosgalvezp. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. We currently call t

[PATCH] D128752: [CUDA] Stop adding CUDA features twice

2022-06-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D128752#3616553 , @tra wrote: >> we no longer will have a cached CUDA installation so we will usually create >> it twice. > > Does that result in extra output in case we find an unexpected CUDA version, > or when compiler is

[PATCH] D128752: [CUDA] Stop adding CUDA features twice

2022-06-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D128752#3616675 , @tra wrote: > We already heard complaints that searching for CUDA installation in multiple > places does add a measurable delay when the search hits NFS-mounted > directories. > > Replacing uses of `CudaInst

[PATCH] D128752: [CUDA] Stop adding CUDA features twice

2022-06-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D128752#3616831 , @tra wrote: > Do we have tests that verify `-target-feature` arguments? It may be worth > adding a test case there checking for redundant features. Yeah, we have some existing tests that check for including

[PATCH] D128550: [OpenMP] Change OpenMP code generation for target region entries

2022-06-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 440822. jhuber6 added a comment. Herald added subscribers: mattd, asavonic. Fix tests, lots of lines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128550/new/ https://reviews.llvm.org/D128550 Files: clang/l

[PATCH] D128550: [OpenMP] Change OpenMP code generation for target region entries

2022-06-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 440831. jhuber6 added a comment. Format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128550/new/ https://reviews.llvm.org/D128550 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/test/OpenMP/capturing_i

[PATCH] D128816: [OpenMP] Add loop tripcount argument to kernel launch and remove push function

2022-06-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, ABataev. Herald added subscribers: mattd, asavonic, guansong, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, sste

[PATCH] D128752: [CUDA] Stop adding CUDA features twice

2022-06-29 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG56ab966a04dd: [CUDA] Stop adding CUDA features twice (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128752/new/ https://reviews.llvm.o

[PATCH] D128550: [OpenMP] Change OpenMP code generation for target region entries

2022-06-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 441048. jhuber6 added a comment. Update with new version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128550/new/ https://reviews.llvm.org/D128550 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/test/

[PATCH] D128816: [OpenMP] Add loop tripcount argument to kernel launch and remove push function

2022-06-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 441049. jhuber6 added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128816/new/ https://reviews.llvm.org/D128816 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CGOpenMPRun

[PATCH] D124624: [OpenMP] Add variant extension that applies to declarations

2022-06-29 Thread Joseph Huber 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 rGf892ddb3be64: [OpenMP] Add variant extension that applies to declarations (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org

[PATCH] D128850: [HIP] Generate offloading entries for HIP with the new driver.

2022-06-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, yaxunl, tra. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch adds the small change required to outp

[PATCH] D128914: [HIP] Add support for handling HIP in the linker wrapper

2022-06-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, yaxunl, tra. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch adds the necessary changes required to

[PATCH] D128923: [LinkerWrapper] Add AMDGPU specific options to the LLD invocation

2022-06-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: arsenm, JonChesterfield, saiislam, yaxunl. Herald added subscribers: kosarev, t-tye, tpr, dstuttard, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, wdng. Herald added a

[PATCH] D128914: [HIP] Add support for handling HIP in the linker wrapper

2022-06-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Thanks for the comments. Comment at: clang/test/Driver/linker-wrapper.c:109 // RUN: clang-offload-packager -o %t-lib.out \ // RUN: --image=file=%S/Inputs/dummy-elf.o,kind=openmp,triple=nvptx64-nvidia-cuda,arch=sm_70 \ tra wrote:

[PATCH] D129033: [Clang] Use metadata to make identifying embedded objects easier

2022-07-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, ABataev, MaskRay, tianshilei1992. Herald added subscribers: StephenFan, hiraditya. Herald added a project: All. jhuber6 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscriber

[PATCH] D128923: [LinkerWrapper] Add AMDGPU specific options to the LLD invocation

2022-07-05 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0bb1bf1b1761: [LinkerWrapper] Add AMDGPU specific options to the LLD invocation (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128923/n

[PATCH] D128914: [HIP] Add support for handling HIP in the linker wrapper

2022-07-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 442356. jhuber6 added a comment. Addressing some comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128914/new/ https://reviews.llvm.org/D128914 Files: clang/test/Driver/linker-wrapper-image.c clang/t

[PATCH] D128914: [HIP] Add support for handling HIP in the linker wrapper

2022-07-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128914/new/ https://reviews.llvm.org/D128914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D129033: [Clang] Use metadata to make identifying embedded objects easier

2022-07-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 442926. jhuber6 added a comment. Updating to use `objects` and adding documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129033/new/ https://reviews.llvm.org/D129033 Files: clang/test/Frontend/embe

[PATCH] D129151: [Metadata] Add 'exclude' metadata to add the exclude flags on globals

2022-07-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 442941. jhuber6 added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Addressing comments. Metadata is now empty and must be empty for the flag to be emitted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D129033: [Clang] Use metadata to make identifying embedded objects easier

2022-07-07 Thread Joseph Huber 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 rGed801ad5e5fe: [Clang] Use metadata to make identifying embedded objects easier (authored by jhuber6). Changed prior to commit: https://reviews.llv

[PATCH] D129151: [Metadata] Add 'exclude' metadata to add the exclude flags on globals

2022-07-07 Thread Joseph Huber 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 rG41fba3c107a5: [Metadata] Add 'exclude' metadata to add the exclude flags on globals (authored by jhuber6). Repository: rG LLVM Github Monorepo CH

[PATCH] D128550: [OpenMP] Change OpenMP code generation for target region entries

2022-07-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 443011. jhuber6 added a comment. Moving version field to struct Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128550/new/ https://reviews.llvm.org/D128550 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang

[PATCH] D128816: [OpenMP] Add loop tripcount argument to kernel launch and remove push function

2022-07-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 443013. jhuber6 added a comment. Rebasing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128816/new/ https://reviews.llvm.org/D128816 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CGOpenMPR

[PATCH] D129301: [clang-offload-bundler][NFC] Library-ize ClangOffloadBundler (1/4)

2022-07-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D129301#3637642 , @jdoerfert wrote: > Isn't the offload bundler on it's "way out" (=replaced and then deleted soon)? HIP still uses it to create their `fatbinary` format for CUDA-like support for multi-architecture binaries a

[PATCH] D129383: [LinkerWrapper] Fix use of string savers and correctly pass bitcode libraries

2022-07-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, ye-luo. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch removes some uses of string savers that are no-longer needed. We also

[PATCH] D129301: [clang-offload-bundler][NFC] Library-ize ClangOffloadBundler (1/4)

2022-07-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D129301#3639318 , @yaxunl wrote: > I think before the new binary format supports Windows and -fno-gpu-rdc and > HIP runtime support the new binary format, we cannot deprecate > clang-offload-bundler. I expect that would take

[PATCH] D128550: [OpenMP] Change OpenMP code generation for target region entries

2022-07-08 Thread Joseph Huber 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 rG1fff116645b3: [OpenMP] Change OpenMP code generation for target region entries (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D128816: [OpenMP] Add loop tripcount argument to kernel launch and remove push function

2022-07-08 Thread Joseph Huber 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 rG5300263c70da: [OpenMP] Add loop tripcount argument to kernel launch and remove push function (authored by jhuber6). Repository: rG LLVM Github Mon

[PATCH] D129393: [Clang] Fix the wrong features being derivec in the offload packager

2022-07-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, ye-luo, tra. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. The offload packager embeds the features

  1   2   3   4   5   6   7   8   9   10   >