[PATCH] D151349: [HIP] emit macro `__HIP_NO_IMAGE_SUPPORT`

2023-06-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I've started seeing these errors when compiling for OpenMP targeting AMDGPU: $ clang input.c -fopenmp --offload-arch=gfx1030 warning: feature flag '+image-insts' is ignored since the feature is read only [-Winvalid-command-line-argument] Any suggestions for what mig

[PATCH] D153123: Fix diag for read-only target features

2023-06-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/driver-openmp-amdgpu.c:8 +// RUN: --offload-device-only -o - 2>&1 | FileCheck --check-prefix=CHECK %s +// CHECK-NOT: warning: feature flag {{.*}} is ignored since the feature is read only jdoerfert w

[PATCH] D139287: [WIP][OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Why do we have the JIT in the nextgen plugins? I figured that JIT would be handled by `libomptarget` proper rather than the plugins. I guess this is needed for per-kernel specialization? My idea of the rough pseudocode would be like this and we wouldn't need a complex c

[PATCH] D139287: [WIP][OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D139287#3971024 , @tianshilei1992 wrote: > In D139287#3970996 , @jhuber6 wrote: > >> Why do we have the JIT in the nextgen plugins? I figured that JIT would be >> handled by `libompta

[PATCH] D139287: [WIP][OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp:184 + + auto AddStream = + [&](size_t Task, tianshilei1992 wrote: > jhuber6 wrote: > > tianshilei1992 wrote: > > > jhuber6 wrote: > > > > tianshil

[PATCH] D138862: [Clang] Do not set offload kind in a freestanding build

2022-12-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D138862#3955581 , @tra wrote: > OK. So, we do need a flag, at least for now. I think we'll need a new one, > because `-freestanding` will likely do a lot of things we don't actually want > on the host side. > How about `--off

[PATCH] D139287: [WIP][OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. We should probably make a test for this. Do we currently test the nextgen plugins? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139287/new/ https://reviews.llvm.org/D139287 ___

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2022-12-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Maybe we should wait until D138389 lands and we can update both, otherwise we'd need a second patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139730/new/ https://reviews.llvm.org/D13

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2022-12-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I'm not fully up-to-date, what's the main difference and advantage of the new code object version? What do all the new implicit arguments do. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:953 getAMDGPUCodeObjectVersion(getDriver(), DriverAr

[PATCH] D136100: [clang-format] Do not parse certain characters in pragma directives

2022-12-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D136100#3988424 , @hans wrote: > Chromium is seeing a formatting regression after this: > https://github.com/llvm/llvm-project/issues/59473 My guess is from this line, we could be more specific on the type of pragma. if (S

[PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading

2022-12-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Some nits. Comment at: openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp:132 + +OptimizationLevel getptLevel(unsigned OptLevel) { + switch (OptLevel) { typo Comment at: openmp/libomptarget/plugins-

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, JonChesterfield. Herald added subscribers: mattd, gchakrabarti, carlosgalvezp, asavonic. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald adde

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added a comment. I just realized the method of copying the `.o` to a `.cubin` doesn't work if the link step is done in the same compilation because it doesn't exist yet. To fix this I could either make the tool chain emit `.cubin` if we're going

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D140158#3999783 , @tra wrote: > In D140158#3999716 , @jhuber6 wrote: > >> I just realized the method of copying the `.o` to a `.cubin` doesn't work if >> the link step is done in the s

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 483389. jhuber6 added a comment. Addressing comments, I did the symbolic link method. It's a stupid hack that's only necessary because of nvlink's poor handling but I think this works around it well enough. Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 483507. jhuber6 added a comment. Fix format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140158/new/ https://reviews.llvm.org/D140158 Files: clang/lib/Driver/Driver.cpp clang/lib/Driver/ToolChains/Cuda.cp

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

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, JonChesterfield. Herald added subscribers: kosarev, mattd, gchakrabarti, asavonic, jdoerfert, Anastasia, tpr. Herald added a reviewer: aaron.ballman. Herald added a project: All. jhuber6 requested review of this revision. Herald added a

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 483576. jhuber6 added a comment. Accidentally deleted the old `getInputFilename` routine which we need. The symlink worked fine but would break on Windows, so I ended up writing a hack that would only use `.cubin` if we have the `nvlink` linker active and the

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

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:7362 + if (FD->hasAttr()) { +addNVVMMetadata(F, "kernel", 1); + } tra wrote: > How does AMDGPU track kernels? It may be a good opportunity to stop using > metadata for this if we c

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

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 483640. jhuber6 added a comment. Changing to use the same CUDA global attributes. This requires a few extra checks for whether or not we were in CUDA mode since previously it just assume any time we saw one of these globals we were in that mode. I added a di

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

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1198 -def CUDAGlobal : InheritableAttr { - let Spellings = [GNU<"global">, Declspec<"__global__">]; +def CUDAGlobal : InheritableAttr, TargetSpecificAttr { + let Spellings = [GNU<"global">, Declspec<

[PATCH] D117320: [OpenMP] Mark device RTL variables as hidden

2022-01-18 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 rGdcb83b236421: [OpenMP] Mark device RTL variables as hidden (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D117362: [OpenMP] Remove hidden visibility for declare target variables

2022-01-18 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 rGd081bfcd17c1: [OpenMP] Remove hidden visibility for declare target variables (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D117362: [OpenMP] Remove hidden visibility for declare target variables

2022-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a subscriber: ronlieb. jhuber6 added a comment. In D117362#3254681 , @JonChesterfield wrote: > If I'm following correctly, this broke the amdgpu buildbot and it has been > moved into staging as a workaround. I haven't debugged what breaks

[PATCH] D117246: [OpenMP] Add support for linking AMDGPU images

2022-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp:297 + +std::string Arch = DAL->getLastArgValue(options::OPT_march_EQ).str(); +if (Arch.empty()) { JonChesterfield wrote: > This part is valuable as-is and probably ind

[PATCH] D117706: [openmp] Unconditionally set march commandline argument

2022-01-19 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, with this you should be able to replace calls for the AMDGPU arch with querying the ToolChain args, e.g. `TCArgs.getLastArgValue(options::OPT_march_EQ)` Repository: rG LLVM Github

[PATCH] D117049: [OpenMP] Add support for embedding bitcode images in wrapper tool

2022-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D117049#3255748 , @saiislam wrote: > It seems that this patch along with D117156 > and D117246 > is giving `patch application failed` error > [https://bui

[PATCH] D117634: [OpenMP] Expand short verisions of OpenMP offloading triples

2022-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 401357. jhuber6 edited the summary of this revision. jhuber6 added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Changing approach to simply expand the triple where we parse it for OpenMP. Repository: rG LLVM Github Mono

[PATCH] D117634: [OpenMP] Expand short verisions of OpenMP offloading triples

2022-01-19 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG28d718602ad2: [OpenMP] Expand short verisions of OpenMP offloading triples (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D117634?vs=401357&id=401454#toc Repository: rG LLVM

[PATCH] D117246: [OpenMP] Add support for linking AMDGPU images

2022-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 401466. jhuber6 added a comment. Updating after upstreaming a portion of this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117246/new/ https://reviews.llvm.org/D117246 Files: clang/tools/clang-linker

[PATCH] D117777: [OpenMP] Don't pass empty files to nvlink

2022-01-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, ye-luo, lechenyu. Herald added subscribers: guansong, yaxunl. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch adds and exception to the nvlink wr

[PATCH] D117777: [OpenMP] Don't pass empty files to nvlink

2022-01-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 401646. jhuber6 added a comment. Herald added a subscriber: asavonic. Adding test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D11/new/ https://reviews.llvm.org/D11 Files: clang/test/Driver/Inputs/op

[PATCH] D117806: [OpenMP] Remove overriding visibility for device declarations

2022-01-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, ABataev. Herald added subscribers: asavonic, guansong, yaxunl. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch removes the speci

[PATCH] D117777: [OpenMP] Don't pass empty files to nvlink

2022-01-20 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaf5600420b93: [OpenMP] Don't pass empty files to nvlink (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D11/new/ https://reviews.llv

[PATCH] D117806: [OpenMP] Remove overriding visibility for device declarations

2022-01-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 401716. jhuber6 added a comment. Changing to use default `protected` instead of passing `-Bsymbolic` this should be more portable and make the intentions clearer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D117806: [OpenMP] Change default visibility to protected for device declarations

2022-01-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/declare_target_codegen.cpp:293 -}; -int SS::SSS = 1; #endif jdoerfert wrote: > What happened here? That was a special case I added that was only necessary when we were trying to remove things from bei

[PATCH] D117806: [OpenMP] Change default visibility to protected for device declarations

2022-01-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 401766. jhuber6 added a comment. Changing to use '-fvisibility=protected' when we construct the job. This is much more transparent and leaves the option open for the user to override it if they need default visibility. Repository: rG LLVM Github Monorepo

[PATCH] D117806: [OpenMP] Change default visibility to protected for device declarations

2022-01-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 401811. jhuber6 added a comment. Forgot to make this mutually exclusive with user defined visibility value. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117806/new/ https://reviews.llvm.org/D117806 Files: c

[PATCH] D117806: [OpenMP] Change default visibility to protected for device declarations

2022-01-20 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/Clang.cpp:5830 + // host, makes the system more robust, and improves performance. + if (IsOpenMPDevice) { +CmdArgs.push_back("-fvisibility"); Jo

[PATCH] D117806: [OpenMP] Change default visibility to protected for device declarations

2022-01-20 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jhuber6 marked an inline comment as done. Closed by commit rG0dfe953294ba: [OpenMP] Change default visibility to protected for device declarations (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D116910: [OpenMP][3/3] Introduce the KernelEnvironment into Clang tests

2022-01-21 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 if it passes all the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116910/new/ https://reviews.llvm.org/D116910 _

[PATCH] D117048: [OpenMP] Link the bitcode library late for device LTO

2022-01-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 402925. jhuber6 added a comment. Squash other uncommitted changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117048/new/ https://reviews.llvm.org/D117048 Files: clang/lib/Driver/ToolChains/AMDGPUOpenMP.c

[PATCH] D117049: [OpenMP] Add support for embedding bitcode images in wrapper tool

2022-01-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 402926. jhuber6 added a comment. Rework commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117049/new/ https://reviews.llvm.org/D117049 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/i

[PATCH] D117156: [OpenMP] Add extra flag handling to linker wrapper

2022-01-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 402928. jhuber6 added a comment. Rework commits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117156/new/ https://reviews.llvm.org/D117156 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/tools/clang-lin

[PATCH] D117246: [OpenMP] Add support for linking AMDGPU images

2022-01-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 402929. jhuber6 added a comment. Update commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117246/new/ https://reviews.llvm.org/D117246 Files: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp In

[PATCH] D118155: [OpenMP] Improve symbol resolution for OpenMP Offloading LTO

2022-01-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, ronlieb, saiislam. Herald added subscribers: guansong, inglorion, yaxunl. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch improv

[PATCH] D118197: [OpenMP] Replace sysmtem call to `llc` with target machine

2022-01-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, ronlieb, saiislam. Herald added subscribers: mikhail.ramalho, guansong, yaxunl, mgorny. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Thi

[PATCH] D118198: [OpenMP] Remove call to 'clang-offload-wrapper' binary

2022-01-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, ronlieb, saiislam. Herald added subscribers: guansong, yaxunl, mgorny. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch removes t

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.h:279 + /// List of file passed with -fembed-offload-binary option to embed + /// device-side offloading binaries in the host object file. JonChesterfield wrote: > This is unc

[PATCH] D116541: [OpenMP] Introduce new flag to change offloading driver pipeline

2022-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Driver/Driver.h:45 +class Command; +class Compilation; +class JobList; JonChesterfield wrote: > This looks like it should be a breaking change - InputInfo is no longer > forward declared. Would it be

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 403404. jhuber6 added a comment. Herald added a subscriber: mgorny. Updating approach, use a vector of string pairs now. Multiple files are simply passed multiple times. Will add filename to the offloading section name laterf, as similar sections could be merg

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: llvm/lib/Bitcode/Writer/CMakeLists.txt:14 MC + TransformUtils Object I'm not sure if it's worth linking TransformUtils just for `appendToCompilerUsed` I can copy the implementation locally if not. Repository:

[PATCH] D116543: [OpenMP] Embed device files into the host IR

2022-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 403413. jhuber6 added a comment. Updating after changing flag in D116542 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116543/new/ https://reviews.llvm.org/D116543 Files: c

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 403468. jhuber6 added a comment. clang format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116542/new/ https://reviews.llvm.org/D116542 Files: clang/include/clang/Basic/CodeGenOptions.h clang/include/cla

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 403476. jhuber6 added a comment. Forgot to rename file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116542/new/ https://reviews.llvm.org/D116542 Files: clang/include/clang/Basic/CodeGenOptions.h clang/in

[PATCH] D118399: [OpenMP] Introduce new flag to indicate OpenMP runtime compilation

2022-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield. Herald added subscribers: dexonsmith, dang, guansong, yaxunl, mgorny. jhuber6 requested review of this revision. Herald added subscribers: openmp-commits, cfe-commits, sstefan1. Herald added projects

[PATCH] D118399: [OpenMP] Introduce new flag to indicate OpenMP runtime compilation

2022-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D118399#3277221 , @tianshilei1992 wrote: > Do we have an alternative w/o need to add a flag dedicated for building a > very specific target, OpenMP device runtime? The only difference between building the OpenMP device runti

[PATCH] D118399: [OpenMP] Introduce new flag to indicate OpenMP runtime compilation

2022-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D118399#3277222 , @jhuber6 wrote: > In D118399#3277221 , > @tianshilei1992 wrote: > >> Do we have an alternative w/o need to add a flag dedicated for building a >> very specific targe

[PATCH] D118399: [OpenMP] Only generate runtime flags with host input

2022-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 403762. jhuber6 added a comment. Changing to use host bitcode instead of adding a new flag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118399/new/ https://reviews.llvm.org/D118399 Files: clang/lib/CodeGen

[PATCH] D118399: [OpenMP] Only generate runtime flags with host input

2022-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D118399#3277328 , @ABataev wrote: > Tests, if possible? The flags being generated should be covered by an existing test, I'll add a line where we don't specify a bitcode library. In D118399#3277357

[PATCH] D118399: [OpenMP] Only generate runtime flags with host input

2022-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 403775. jhuber6 added a comment. Adding test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118399/new/ https://reviews.llvm.org/D118399 Files: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/test/OpenMP/tar

[PATCH] D118399: [OpenMP] Only generate runtime flags with host input

2022-01-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 rG2945f11c605b: [OpenMP] Only generate runtime flags with host input (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1774 + SectionName += "."; + SectionName += *BinarySection; +} JonChesterfield wrote: > jhuber6 wrote: > > JonChesterfield wrote: > > > This looks lossy - if two files use

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/Frontend/embed-object.ll:2 +; RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm \ +; RUN:-fembed-offload-object=%S/Inputs/empty.h,section -x ir %s -o - \ +; RUN:| FileCheck %s -check-prefix=CHECK

[PATCH] D116543: [OpenMP] Embed device files into the host IR

2022-01-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404030. jhuber6 added a comment. Adding test for multiple input files to embed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116543/new/ https://reviews.llvm.org/D116543 Files: clang/lib/Driver/ToolChains/C

[PATCH] D116543: [OpenMP] Embed device files into the host IR

2022-01-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404033. jhuber6 added a comment. Add input filename to the section name to prevent it from being merged if the user does a link. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116543/new/ https://reviews.llvm.o

[PATCH] D116545: [OpenMP] Add support for extracting device code in linker wrapper

2022-01-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404035. jhuber6 added a comment. Changing section embedding after adding filenames previously. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116545/new/ https://reviews.llvm.org/D116545 Files: clang/tools/cl

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404037. jhuber6 added a comment. Adding test for multiple files (added it to wrong commit). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116542/new/ https://reviews.llvm.org/D116542 Files: clang/include/cla

[PATCH] D116543: [OpenMP] Embed device files into the host IR

2022-01-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404038. jhuber6 added a comment. Remove test that was intended for previous commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116543/new/ https://reviews.llvm.org/D116543 Files: clang/lib/Driver/ToolChai

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404047. jhuber6 added a comment. Changing the name to be the section name. This ensures that if the sections get merged we will get a linker error without failing silently. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D118495: [OpenMP] Accept shortened triples for -Xopenmp-target=

2022-01-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, jdoerfert, tianshilei1992. Herald added subscribers: guansong, yaxunl. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch builds on the change

[PATCH] D118495: [OpenMP] Accept shortened triples for -Xopenmp-target=

2022-01-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404136. jhuber6 added a comment. Adding test and shared function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118495/new/ https://reviews.llvm.org/D118495 Files: clang/include/clang/Driver/ToolChain.h cl

[PATCH] D118495: [OpenMP] Accept shortened triples for -Xopenmp-target=

2022-01-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 rG24f88f57de58: [OpenMP] Accept shortened triples for -Xopenmp-target= (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404506. jhuber6 added a comment. Add error handling routine to ensure that the embedding string is always a pair separated by a single ','. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116542/new/ https://rev

[PATCH] D116543: [OpenMP] Embed device files into the host IR

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D116543#3283874 , @JonChesterfield wrote: > Description and test have slightly diverged from implementation - filename is > appended to disambiguate, but the filecheck regex only looks at the prefix > and the name described

[PATCH] D116543: [OpenMP] Embed device files into the host IR

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404513. jhuber6 added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116543/new/ https://reviews.llvm.org/D116543 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/openmp-of

[PATCH] D118493: Set rpath on openmp executables

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/implicit_rpath.c:28 +// CHECK-COMPOSABLE: ({{R|RUN}}PATH) Library {{r|run}}path: [early:late:{{.*}}llvm/lib] + +int main() {} JonChesterfield wrote: > This ^ probably has path separator issues on windo

[PATCH] D118493: Set rpath on openmp executables

2022-01-31 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 someone else has reservations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118493/new/ https://reviews.llvm.org/D118493 __

[PATCH] D116975: [OpenMP] Initial Implementation of LTO and bitcode linking in linker wrapper

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404528. jhuber6 added a comment. Moving adding OpenMPOpt to LTO pipeline to a new patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116975/new/ https://reviews.llvm.org/D116975 Files: clang/lib/Driver/Dri

[PATCH] D116545: [OpenMP] Add support for extracting device code in linker wrapper

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:258 + if (ToBeDeleted.empty()) +return None; + jdoerfert wrote: > if (!StripSections) > return None; Fixed this later, I could rebase it so it applies here i

[PATCH] D116545: [OpenMP] Add support for extracting device code in linker wrapper

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D116545#3284541 , @jdoerfert wrote: > what commit contains the tests? The previous four have clang tests, showing that we call this tool with the expected arguments. Testing the tool itself requires running it, so I was thin

[PATCH] D116544: [Clang] Introduce Clang Linker Wrapper Tool

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404585. jhuber6 added a comment. Adding documentation for tool. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116544/new/ https://reviews.llvm.org/D116544 Files: clang/docs/ClangLinkerWrapper.rst clang/doc

[PATCH] D116675: [OpenMP] Search for static libraries in offload linker tool

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:646 +if (Arg.startswith("-L")) + LibraryPaths.push_back(Arg.drop_front(2)); + jdoerfert wrote: > This seems to handle `-Lfoo`, what about `-L bar`? at leas

[PATCH] D116627: [Clang] Initial support for linking offloading code in tool

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:425 + ErrorOr NvlinkPath = sys::findProgramByName( + "nvlink", sys::path::parent_path(LinkerExecutable)); + if (!NvlinkPath) jdoerfert wrote: > Unsure why we

[PATCH] D116627: [Clang] Initial support for linking offloading code in tool

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404598. jhuber6 added a comment. Maxing suggested changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116627/new/ https://reviews.llvm.org/D116627 Files: clang/tools/clang-linker-wrapper/ClangLinkerWrappe

[PATCH] D116541: [OpenMP] Introduce new flag to change offloading driver pipeline

2022-01-31 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 rG2f9ace9e9a58: [OpenMP] Introduce new flag to change offloading driver pipeline (authored by jhuber6). Changed prior to commit: https://reviews.llv

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-31 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 rG551b17745244: [OpenMP] Add a flag for embedding a file into the module (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D1

[PATCH] D116543: [OpenMP] Embed device files into the host IR

2022-01-31 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 rG12ae095bbb63: [OpenMP] Embed device files into the host IR (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D116544: [Clang] Introduce Clang Linker Wrapper Tool

2022-01-31 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 rG95c8f7464092: [Clang] Introduce Clang Linker Wrapper Tool (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D116544: [Clang] Introduce Clang Linker Wrapper Tool

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D116544#3285369 , @jyknight wrote: > "clang-linker-wrapper" seems like a very generic name for a command which is > OpenMP offloading specific? This could potentially be used to handle CUDA / HIP offloading as well, so I del

[PATCH] D116541: [OpenMP] Introduce new flag to change offloading driver pipeline

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D116541#3285455 , @thakis wrote: > Looks like this breaks tests on macOS: > http://45.33.8.238/macm1/26856/step_7.txt > > Please take a look and revert for now if it takes a while to fix (maybe just > needs an explicit triple

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D116542#3285857 , @cmtice wrote: > This change introduces a circular dependency: BitcodeWriters now depends on > TransformUtils, but TransformUtils also depends on BitcodeWriters. This > appears to be a layering violation.

[PATCH] D116541: [OpenMP] Introduce new flag to change offloading driver pipeline

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D116541#3285927 , @thakis wrote: > Still failing: http://45.33.8.238/macm1/26873/step_7.txt Weird, can you show me what `-fopenmp -fopenmp-targets=nvptx64 -fopenmp-new-driver -ccc-print-bindings` looks like there? I'm not sur

[PATCH] D116542: [OpenMP] Add a flag for embedding a file into the module

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D116542#3285983 , @MaskRay wrote: > @jhuber6 Please don't do 4a780aa13ee5e1c8268de54ef946200a270127b9 > .. OK, I > was late. > > See D118666

[PATCH] D118666: [ModuleUtils] Move EmbedBufferInModule to LLVMTransformsUtils

2022-01-31 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, thanks for fixing this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118666/new/ https://reviews.llvm.org/D118666

[PATCH] D116541: [OpenMP] Introduce new flag to change offloading driver pipeline

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D116541#3285927 , @thakis wrote: > Still failing: http://45.33.8.238/macm1/26873/step_7.txt It seems what's happening here is that we are building the host.bc twice, this will work fine but isn't ideal. I prevent this manuall

[PATCH] D117048: [OpenMP] Link the bitcode library late for device LTO

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:75 +static cl::opt +BitcodeLibrary("target-library", + cl::desc("Path for the target bitcode library"), tianshilei1992 wrote: > `target-librar

[PATCH] D116975: [OpenMP] Initial Implementation of LTO and bitcode linking in linker wrapper

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8154 +for (auto TI = OpenMPTCRange.first, TE = OpenMPTCRange.second; TI != TE; + ++TI) { + const ToolChain *TC = TI->second; jdoerfert wrote: > Nit: maybe `for (auto

[PATCH] D117156: [OpenMP] Add extra flag handling to linker wrapper

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:98 +static cl::opt +PtxasOption("ptxas-option", cl::ZeroOrMore, +cl::desc("Argument to pass to the ptxas invocation"),

[PATCH] D118155: [OpenMP] Improve symbol resolution for OpenMP Offloading LTO

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:777-781 +// Record if we've seen these symbols in any object or shared libraries. +if ((*ObjFile)->isRelocatableObject()) { + UsedInRegularObj[*Name] = tru

<    9   10   11   12   13   14   15   16   >