[PATCH] D150156: [OpenMP] Fix incorrect interop type for number of dependencies

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 520543. jhuber6 added a comment. Fix `add_attributes.ll` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150156/new/ https://reviews.llvm.org/D150156 Files: clang/test/OpenMP/interop_irbuilder.cpp

[PATCH] D150156: [OpenMP] Fix incorrect interop type for number of dependencies

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D150156#4328360 , @tianshilei1992 wrote: > Does this cause the IR issue? Not sure, I just get an undefined symbol error in the linker now. Not sure if that means it's resolved or I just can't reproduce it. Repository:

[PATCH] D150156: [OpenMP] Fix incorrect interop type for number of dependencies

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 520526. jhuber6 added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150156/new/ https://reviews.llvm.org/D150156

[PATCH] D150136: [Clang] Change default triple to LLVM_HOST_TRIPLE for the CUDA toolchain

2023-05-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 rGc2c917f7f668: [Clang] Change default triple to LLVM_HOST_TRIPLE for the CUDA toolchain (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D150136: [Clang] Change default triple to LLVM_HOST_TRIPLE for the CUDA toolchain

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D150136#4327570 , @tra wrote: > The change may be an improvement, but we may still have a potential issue > here. > > E.g. ideally we may want to be able to cross-compile a CUDA app on a powerpc > or ARM build host targeting

[PATCH] D150136: [Clang] Change default triple to LLVM_HOST_TRIPLE for the CUDA toolchain

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl. Herald added a subscriber: mattd. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. When cross-compiling NVPTX we use the

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:546 addLinkerCompressDebugSectionsOption(getToolChain(), Args, CmdArgs); AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA); + Args.AddAllArgs(CmdArgs, options::OPT_L);

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:546 addLinkerCompressDebugSectionsOption(getToolChain(), Args, CmdArgs); AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA); + Args.AddAllArgs(CmdArgs, options::OPT_L);

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, JonChesterfield. Herald added subscribers: kosarev, kerbowa, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, wdng. Herald

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149978#4323452 , @tra wrote: >> I've discovered that LLVM adds -Wl,-fcolor-diagnostics > > Can you tell me where it's done? `llvm/cmake/modules/HandleLLVMOptions.cmake:994` Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149978#4323328 , @tra wrote: >> The latter is a little difficult, > > The more we dig, the more we want GPU-capable lld. :-) My thoughts exactly. I had a small chat with @MaskRay about how difficult it would be to spin up

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 519977. jhuber6 added a comment. Putting up the hack that works around my problem with `libc`. Definitely not a good solution though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149978/new/

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149978#4323221 , @tra wrote: > In D149978#4323210 , @jhuber6 wrote: > >> Somewhat annoying, I've discovered that LLVM adds `-Wl,-fcolor-diagnostics` >> which obviously isn't

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. The main reason I made this patch was to allow passing `--suppress-stack-size-warning` to `nvlink`. But it turns out it's a little more difficult there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149978/new/

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Somewhat annoying, I've discovered that LLVM adds `-Wl,-fcolor-diagnostics` which obviously isn't supported by `nvlink` so it fails while including this in `libc`'s CMake. Any clue if there's a way to work around that? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 519957. jhuber6 added a comment. Addressing comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149978/new/ https://reviews.llvm.org/D149978 Files: clang/lib/Driver/ToolChains/Cuda.cpp

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:594 - // Add paths specified in LIBRARY_PATH environment variable as -L options. - addDirectoryList(Args, CmdArgs, "-L", "LIBRARY_PATH"); -

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, tra, yaxunl, MaskRay. Herald added subscribers: mattd, gchakrabarti, asavonic. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-04 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf05ce9045af4: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D149451?vs=518604=519448#toc Repository:

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 518604. jhuber6 added a comment. Add option to allow overriding the global hash. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149451/new/ https://reviews.llvm.org/D149451 Files:

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: llvm/lib/Target/NVPTX/NVPTXCtorDtorLowering.cpp:58 +((IsCtor ? "__init_array_object_" : "__fini_array_object_") + + F->getName() + "_" + getHash(M.getName()) + "_" + + std::to_string(Priority))

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 518553. jhuber6 added a comment. Changing to use source filename. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149451/new/ https://reviews.llvm.org/D149451 Files: clang/lib/Driver/ToolChains/Cuda.cpp

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: llvm/lib/Target/NVPTX/NVPTXCtorDtorLowering.cpp:58 +((IsCtor ? "__init_array_object_" : "__fini_array_object_") + + F->getName() + "_" + getHash(M.getName()) + "_" + + std::to_string(Priority))

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-04-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 518262. jhuber6 added a comment. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Update to only enable this when in "freestanding" mode. Also add a hash based on the module name to the global. Repository: rG LLVM Github

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-24 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf66576016290: [Clang] Accept and forward `-fconvergent-functions` in the driver (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D149019?vs=516188=516400#toc Repository: rG

[PATCH] D149028: [Clang] Always pass `-fconvergent-functions` for GPU targets

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149028#4290831 , @JonChesterfield wrote: > I think this is sensible. Passing fno-convergent-functions presumably changes > the default? > > I wonder if we should adopt this and then remove the checks for each of the > GPU

[PATCH] D149028: [Clang] Always pass `-fconvergent-functions` for GPU targets

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 516198. jhuber6 added a comment. Herald added subscribers: mattd, asavonic. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149028/new/ https://reviews.llvm.org/D149028 Files:

[PATCH] D149028: [Clang] Always pass `-fconvergent-functions` for GPU targets

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, jdoerfert, tianshilei1992, tra, yaxunl. Herald added a subscriber: kosarev. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. GPU

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 516188. jhuber6 added a comment. Remove cc1 negative option Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149019/new/ https://reviews.llvm.org/D149019 Files: clang/include/clang/Driver/Options.td

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 516167. jhuber6 added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149019/new/ https://reviews.llvm.org/D149019 Files: clang/include/clang/Driver/Options.td

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149019#4290573 , @JonChesterfield wrote: > Can't reasonably see the semantic change between all the whitespace reformat, > please split those two. E.g. use git-clang-format to only fix formatting in > the part you're

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, tra, yaxunl, tianshilei1992, MaskRay, jdoerfert. Herald added subscribers: kosarev, abrachet, phosek, kerbowa, s.egerton, simoncook, asb, jvesely. Herald added a project: All. jhuber6 requested review of this revision.

[PATCH] D148849: [OpenMP-OPT] Remove limit for heap to stack conversions of __kmpc_alloc_shared allocations

2023-04-20 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148849/new/ https://reviews.llvm.org/D148849

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-17 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. LGTM unless anyone else has any concerns. Comment at: clang/test/OpenMP/target_team_variable_codegen.cpp:33 +//. +// CHECK-NVIDIA: @local_a = internal addrspace(3) global

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-16 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1663016b41d7: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D148444?vs=514001=514026#toc

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 514001. jhuber6 added a comment. Rebasing on main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148444/new/ https://reviews.llvm.org/D148444 Files:

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D148444#4272036 , @PiotrZSL wrote: > Fix Linux build before committing & resolve all comments. The log says that it failed because of the CMake version. I don't think I can fix that. Comment at:

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/llvmlibc/inline-function-decl.hpp:64-67 +// CHECK-MESSAGES-NOT: :[[@LINE+4]]:3: warning: '__invoke' must be tagged with the LIBC_INLINE macro; the macro should be placed at the beginning of

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 513997. jhuber6 added a comment. Address nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148444/new/ https://reviews.llvm.org/D148444 Files:

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 513990. jhuber6 added a comment. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148444/new/ https://reviews.llvm.org/D148444 Files: clang-tools-extra/clang-tidy/llvmlibc/InlineFunctionDeclCheck.cpp

[PATCH] D148444: [clang-tidy] Prevent `llvmlibc-inline-function-decl` triggering on lambdas

2023-04-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: lntue, michaelrj, sivachandra, gchatelet, goldstein.w.n. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. jhuber6 requested review of this revision. Herald added a

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/target_team_variable_codegen.cpp:33 +//. +// CHECK-NVIDIA: @local_a = internal addrspace(3) global [10 x i32] zeroinitializer, align 4 +//. jdoerfert wrote: > doru1004 wrote: > > jhuber6 wrote: > > >

[PATCH] D147572: [Clang][OpenMP] Fix failure with team-wide allocated variable

2023-04-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/target_team_variable_codegen.cpp:33 +//. +// CHECK-NVIDIA: @local_a = internal addrspace(3) global [10 x i32] zeroinitializer, align 4 +//. Shouldn't the Nvidia version also be undefined? Not sure why

[PATCH] D147666: [OPENMP] Adds /lib to rpath to avoid need to set LD_LIBRARY_PATH to find plugins.

2023-04-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Using `-rpath` by default with OpenMP was removed after a long conversation in https://reviews.llvm.org/D143306. The way forward is most likely to have AOMP provide this in a resource file configuration. I think @ronlieb has a working version of that. Repository:

[PATCH] D147579: [nvptx-arch] Dynamically load `libcuda.so.1` directly instead

2023-04-04 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 rGad6a7d7dc9a2: [nvptx-arch] Dynamically load `libcuda.so.1` directly instead (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D147579: [nvptx-arch] Dynamically load `libcuda.so.1` directly instead

2023-04-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: tra. Herald added subscribers: mattd, gchakrabarti, asavonic, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jholewinski. Herald added a project: clang. This patch

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2023-04-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 510797. jhuber6 added a comment. Herald added subscribers: kbarton, nemanjai. Fixed the Clang tests. Haven't touched the LLVM ones because this breaks SPMDzation and state machine rewrites completely in those tests. Someone who knows what this patch changes

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-04-03 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 rGf263bd8f7d4c: [Clang] Implicitly include LLVM libc headers for the GPU (authored by jhuber6). Changed prior to commit:

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-04-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1196-1197 + // If we are compiling for a GPU target we want to override the system headers + // with ones created by the 'libc' project if present. + if (!Args.hasArg(options::OPT_nostdinc) &&

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-04-03 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/D146973/new/ https://reviews.llvm.org/D146973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D147365: [HIPSPV] Remove useIntegratedAs. NFC

2023-03-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I don't know the toolchain, does `HIPSPV` perform as expected if you pass `-fno-integrated-as`? The difference is that `useIntegratedAs` forces it to always be enabled so the user can't change it AFAIK. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D145815#4230780 , @jeanPerier wrote: > @agozillon, in the test added here (omp-frontend-forwarding.f90), I am seeing > failures in some patches windows pre-merge checks that I think are not > related to the patches. > Could

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 509090. jhuber6 added a comment. Changing to use the `gpu-none-llvm` subfolder name that @sivachandra recommended. Also adding a `--sysroot` argument to show that this include path shows up first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D146973#4228070 , @tra wrote: > I'm OK with injecting the path *now* with an understanding that it's a > short-term "happens to work" way to move forward while we're working on a > better solution. So, the proposed path

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D146973#4227433 , @aaron.ballman wrote: > I am not asking you to implement a library based off another implementation's > specification. I am relaying implementation experience with the design you've > chosen for your

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D146973#4227114 , @aaron.ballman wrote: > Hmmm, I've had experience with SYCL as to how it goes when you have > difference between host and device; those kinds of bugs are incredibly hard > to track down. Pointer sizes

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D146973#4225983 , @jdoerfert wrote: > I said this before, many times: > > We don't want to have different host and device libraries that are > incompatible. > Effectively, what we really want, is the host environment to just

[PATCH] D146975: [NVPTX] Add __CUDA_ARCH__ macro to standalone NVPTX compilations

2023-03-27 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. jhuber6 marked an inline comment as done. Closed by commit rGbed7005eb4d4: [NVPTX] Add __CUDA_ARCH__ macro to standalone NVPTX compilations (authored by jhuber6).

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D146973#4225641 , @aaron.ballman wrote: >> This lets offloading languages such as OpenMP use the system string.h when >> compiling for the host and then the LLVM libc string.h when targeting the >> GPU. > > How do we avoid

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1230 + llvm::sys::path::append(P, "llvm-libc"); + CmdArgs.push_back("-c-isystem"); + CmdArgs.push_back(Args.MakeArgString(P)); sivachandra wrote: > tra wrote: > >

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D146973#4225300 , @tschuett wrote: > Could you hide the amdgpu and nvptx somewhere libc here `clang > -print-resource-dir` in two different directories? One for AMD, one for > NVPTX. So, right now this header is installed

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1230 + llvm::sys::path::append(P, "llvm-libc"); + CmdArgs.push_back("-c-isystem"); + CmdArgs.push_back(Args.MakeArgString(P)); tra wrote: > jhuber6 wrote: > > tra

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1230 + llvm::sys::path::append(P, "llvm-libc"); + CmdArgs.push_back("-c-isystem"); + CmdArgs.push_back(Args.MakeArgString(P)); tra wrote: > Ensuring the right include

[PATCH] D146975: [NVPTX] Add __CUDA_ARCH__ macro to standalone NVPTX compilations

2023-03-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: clang/lib/Basic/Targets/NVPTX.cpp:171 Builder.defineMacro("__NVPTX__"); - if (Opts.CUDAIsDevice || Opts.OpenMPIsDevice) { + if (Opts.CUDAIsDevice || Opts.OpenMPIsDevice || !HostTarget) {

[PATCH] D146326: [LinkerWrapper] Do not extract globals with no offloading language

2023-03-27 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 rGb530e1af62be: [LinkerWrapper] Do not extract globals with no offloading language (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D146975: [NVPTX] Add __CUDA_ARCH__ macro to standalone NVPTX compilations

2023-03-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, tianshilei1992, ye-luo, jdoerfert. Herald added subscribers: mattd, gchakrabarti, asavonic, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jplehr, sstefan1,

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I'm not sure if there's a better way to provide these headers. Like if we let the `libc` project output to the Clang resource directory or some other neatly nested directory. Right now this just picks up `bin/clang/../include/llvm-libc`. Repository: rG LLVM Github

[PATCH] D146973: [Clang] Implicitly include LLVM libc headers for the GPU

2023-03-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, JonChesterfield, sivachandra, MaskRay, jdoerfert, tianshilei1992. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jplehr, sstefan1. Herald added a project: clang.

[PATCH] D146326: [LinkerWrapper] Do not extract globals with no offloading language

2023-03-27 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/D146326/new/ https://reviews.llvm.org/D146326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

2023-03-24 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 rG29a5c3c8fe30: [NVPTX] Introduce attribute to mark kernels without a language mode (authored by jhuber6). Changed prior to commit:

[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

2023-03-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 508170. jhuber6 added a comment. Updating to simply add an entirely new attribute again. The existing `CUDAGlobal` attribute does what we want, but it's also highly coupled with the CUDA language. This made it pretty much impossible to find a way to re-use it

[PATCH] D146750: [NVPTX] Set the atomic inling threshold when targeting NVPTX directly

2023-03-23 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 rGaf54d1e85285: [NVPTX] Set the atomic inling threshold when targeting NVPTX directly (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

2023-03-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. @tra would it be possible to go to the earlier version that simply duplicated a slight amount of logic to introduce the new and separate attribute `nvptx_kernel`? Overloading CUDA's `device` attribute is problematic because it's used and checked in several different

[PATCH] D146750: [NVPTX] Set the atomic inling threshold when targeting NVPTX directly

2023-03-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, arsenm, tianshilei1992, JonChesterfield. Herald added subscribers: mattd, gchakrabarti, asavonic. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, wdng, jholewinski. Herald

[PATCH] D146552: [Clang][OpenMP] Enable device-mapped constexpr class members to not be optimized out

2023-03-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. LG, thanks. If you include `Fixes: ` in the commit message it'll automatically close it by the way. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146552/new/ https://reviews.llvm.org/D146552

[PATCH] D146552: [Clang][OpenMP] Enable device-mapped constexpr class members to not be optimized out

2023-03-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. We should have a clang test as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146552/new/ https://reviews.llvm.org/D146552 ___ cfe-commits mailing list

[PATCH] D146326: [LinkerWrapper] Do not extract globals with no offloading language

2023-03-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 506190. jhuber6 added a comment. Remove whitespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146326/new/ https://reviews.llvm.org/D146326 Files: clang/test/Driver/linker-wrapper-libs.c

[PATCH] D146326: [LinkerWrapper] Do not extract globals with no offloading language

2023-03-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, tra, yaxunl, tianshilei1992. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jplehr, sstefan1. Herald added a project: clang. The linker wrapper

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. LGTM, it's much simpler for now since Flang doesn't support CUDA, HIP, OpenCL, OpenMP, etc. Comment at: flang/test/Driver/omp-frontend-forwarding.f90:1 +! REQUIRES: amdgpu-registered-target + agozillon

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:128 + if (IsHostOffloadingAction) { +for (size_t i = 1; i < Inputs.size(); ++i) { + if (Inputs[i].getType() != types::TY_Nothing) agozillon wrote: > jhuber6 wrote: > >

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:128 + if (IsHostOffloadingAction) { +for (size_t i = 1; i < Inputs.size(); ++i) { + if (Inputs[i].getType() != types::TY_Nothing) agozillon wrote: > awarzynski wrote: > >

[PATCH] D144569: [Clang][OpenMP] Fix accessing of aligned arrays in offloaded target regions

2023-03-15 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. Herald added a subscriber: jplehr. Pretty sure this is what we discussed in the meeting. So it should be fine to remove the alignment requirement on the declaration since we don't handle it

[PATCH] D145941: [Clang] Always use --no-undefined when linking AMDGPU images

2023-03-14 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 rG55f38495e38e: [Clang] Always use --no-undefined when linking AMDGPU images (authored by jhuber6). Changed prior to commit:

[PATCH] D145941: [Clang] Always use -zdefs when linking AMDGPU images

2023-03-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 505166. jhuber6 added a comment. Adding release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145941/new/ https://reviews.llvm.org/D145941 Files: clang/docs/ReleaseNotes.rst

[PATCH] D145941: [Clang] Always use -zdefs when linking AMDGPU images

2023-03-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 504818. jhuber6 added a comment. Use `--no-undefined` to be consistent with HIP and check for OpenCL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145941/new/ https://reviews.llvm.org/D145941 Files:

[PATCH] D145862: [LinkerWrapper] Switch to add_clang_tool() macro

2023-03-13 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc2aabcfc8395: [LinkerWrapper] Switch to add_clang_tool() macro (authored by foutrelis, committed by jhuber6). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM

[PATCH] D145944: [Clang] Add --version and --help messages to amdgpu/nvptx-arch

2023-03-13 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 rGa26aabefe535: [Clang] Add --version and --help messages to amdgpu/nvptx-arch (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D145941: [Clang] Always use -zdefs when linking AMDGPU images

2023-03-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. This can be turned off with `-zundefs`. So we could instruct people to use `-Wl,-zundefs` or `-Xoffload-linker -zundefs` if the old behavior is desired. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145941/new/

[PATCH] D145944: [Clang] Add --version and --help messages to amdgpu/nvptx-arch

2023-03-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 504670. jhuber6 added a comment. Add help print. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145944/new/ https://reviews.llvm.org/D145944 Files: clang/tools/amdgpu-arch/AMDGPUArch.cpp

[PATCH] D145944: [Clang] Add --version and --help messages to amdgpu/nvptx-arch

2023-03-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, ye-luo. Herald added subscribers: kosarev, mattd, gchakrabarti, asavonic, kerbowa, tpr, dstuttard, yaxunl, jvesely, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision.

[PATCH] D145941: [Clang] Always use -zdefs when linking AMDGPU images

2023-03-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, arsenm, yaxunl, MaskRay. Herald added subscribers: kosarev, kerbowa, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits,

[PATCH] D145820: Insert alloca for kernel args at function entry block instead of the launch point.

2023-03-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. No tests updated? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145820/new/ https://reviews.llvm.org/D145820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D145591: [clang][HIP][OpenMP] Add warning if mixed HIP / OpenMP offloading

2023-03-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D145591#4182748 , @yaxunl wrote: > In D145591#4182360 , @jhuber6 wrote: > >> I'm not a fan of the same warning being copied in 24 places. Why do we set >> `LangOpts.IsOpenMP` on the

[PATCH] D145591: [clang][HIP][OpenMP] Add warning if mixed HIP / OpenMP offloading

2023-03-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I'm not a fan of the same warning being copied in 24 places. Why do we set `LangOpts.IsOpenMP` on the GPU compilation side, couldn't we just filter out the `-fopenmp` or whatever it is for the HIP job? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D129507: [OffloadPackager] Add option to extract files from images

2023-03-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/Driver/offload-packager.c:2-3 +// REQUIRES: x86-registered-target +// REQUIRES: nvptx-registered-target +// REQUIRES: amdgpu-registered-target +// UNSUPPORTED: system-windows bader wrote: > Are nvptx and

[PATCH] D144884: [clang-format] Only add pragma continuation indentation for 'omp' clauses

2023-03-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D144884#4165192 , @MyDeveloperDay wrote: > without this change what does this look like? > > EXPECT_EQ( > "#pragma omp target \\\n" > "reduction(+ : var) \\\n" > "map(to : A[0 : N]) \\\n"

[PATCH] D144884: [clang-format] Only add pragma continuation indentation for 'omp' clauses

2023-03-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1280 +FormatToken *PragmaType = State.Line->First->Next->Next; +if (PragmaType && PragmaType->TokenText.equals("omp")) + return CurrentState.Indent + Style.ContinuationIndentWidth;

[PATCH] D144884: [clang-format] Only add pragma continuation indentation for 'omp' clauses

2023-02-28 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 rG466b4327f8fc: [clang-format] Only add pragma continuation indentation for omp clauses (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D144993: [OpenMP]Emit captured decls for target data if no devices were specified.

2023-02-28 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 a lot for the quick fix. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:7294 + // Emit helper decls of the use_device_ptr/use_device_addr clauses. +

[PATCH] D144884: [clang-format] Only add pragma continuation indentation for 'omp' clauses

2023-02-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 500872. jhuber6 added a comment. Add test for case in https://github.com/llvm/llvm-project/issues/59473 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144884/new/ https://reviews.llvm.org/D144884 Files:

<    1   2   3   4   5   6   7   8   9   10   >