[PATCH] D108246: [clang-offload-wrapper] Disabled ELF offload notes embedding by default.

2021-08-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, applications compile and run now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108246/new/ https://reviews.llvm.org/D108246 __

[PATCH] D102361: [OpenMP] Add Module metadata for OpenMP compilation

2021-06-25 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 rG9ce02ea8c941: [OpenMP] Add Module metadata for OpenMP compilation (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D105187: [OPENMP]Fix PR50640: OpenMP target clause implicitly scaling loop bounds to uint64_t.

2021-06-30 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, work on my end. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105187/new/ https://reviews.llvm.org/D105187

[PATCH] D101976: [OpenMP] Unified entry point for SPMD & generic kernels in the device RTL

2021-07-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:29-31 #include "llvm/IR/IntrinsicsAMDGPU.h" #include "llvm/IR/IntrinsicsNVPTX.h" #include "llvm/IR/PatternMatch.h" Not needed now. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D105375: [OPENMP]Remove const firstprivate allocation as a variable in a constant space.

2021-07-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. This revision causes a bug with generic regions. Firstprivate constants now aren't mapped properly into an internal parallel region and will just be zero. For example if I run this code I will see different values for the constants inside and outside the parallel region

[PATCH] D105647: [OPENMP]Do no privatize const firstprivates in target regions.

2021-07-08 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 Fixed the problem, Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105647/new/ https://reviews.llvm.org/D105647 _

[PATCH] D105898: [OpenMP] Rework OpenMP remarks

2021-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: jdoerfert. Herald added subscribers: ormris, okura, kuter, guansong, hiraditya, yaxunl. jhuber6 requested review of this revision. Herald added a reviewer: sstefan1. Herald added subscribers: llvm-commits, cfe-commits, bbn, sstefan1. Herald a

[PATCH] D105898: [OpenMP] Rework OpenMP remarks

2021-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 358287. jhuber6 added a comment. Addressing comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105898/new/ https://reviews.llvm.org/D105898 Files: clang/test/OpenMP/remarks_parallel_in_multiple_target_s

[PATCH] D105898: [OpenMP] Rework OpenMP remarks

2021-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 358292. jhuber6 added a comment. Forgot to update two tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105898/new/ https://reviews.llvm.org/D105898 Files: clang/test/OpenMP/remarks_parallel_in_multiple_t

[PATCH] D105939: [OpenMP] Add IDs to OpenMP remarks

2021-07-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 358461. jhuber6 added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adding test case for IDs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105939/new/ https://reviews.llvm.o

[PATCH] D112645: [OpenMP] Fix: opposite attributes could be set by -fno-inline

2021-11-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. LGTM. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5370 if (CGM.getCodeGenOpts().OptimizationLevel != 0) Fn->addFnAttr(llvm::Attribute::AlwaysInline); return F

[PATCH] D112645: [OpenMP] Fix: opposite attributes could be set by -fno-inline

2021-11-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/parallel_for_noinline.cpp:1 +// RUN: %clang -O0 -fopenmp -fno-inline %s -S -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-O0 +// RUN: %clang -O1 -fopenmp -fno-inline %s -S -emit-llvm -o - | FileCheck %s -

[PATCH] D111463: [OpenMP] Remove doing assumption propagation in the front end.

2021-11-09 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 rG4b5c3e591d74: [OpenMP] Remove doing assumption propagation in the front end. (authored by jhuber6). Changed prior to commit: https://reviews.llvm.

[PATCH] D97680: [OpenMP] Simplify GPU memory globalization

2021-03-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: jdoerfert. jhuber6 added projects: LLVM, clang, OpenMP. Herald added subscribers: jfb, guansong, hiraditya, yaxunl. jhuber6 requested review of this revision. Herald added subscribers: llvm-commits, openmp-commits, cfe-commits, sstefan1. M

[PATCH] D97680: [OpenMP] Simplify GPU memory globalization

2021-03-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Fixing tests is WIP Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97680/new/ https://reviews.llvm.org/D97680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D98358: [OpenMP] Restore backwards compatibility for libomptarget

2021-03-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: jdoerfert. Herald added subscribers: guansong, yaxunl. jhuber6 requested review of this revision. Herald added subscribers: llvm-commits, openmp-commits, cfe-commits, sstefan1. Herald added projects: clang, OpenMP, LLVM. The changes introduc

[PATCH] D98358: [OpenMP] Restore backwards compatibility for libomptarget

2021-03-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D98358#2617152 , @cchen wrote: > I think some existing Clang OpenMP codegen tests will break if they are > testing against `__kmpc_push_target_tripcount`. I'm working on fixing the tests, I also forgot to include it in the `ex

[PATCH] D98358: [OpenMP] Restore backwards compatibility for libomptarget

2021-03-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 329709. jhuber6 added a comment. Updating tests and adding the new function to the exports. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98358/new/ https://reviews.llvm.org/D98358 Files: clang/lib/CodeGen/C

[PATCH] D98358: [OpenMP] Restore backwards compatibility for libomptarget

2021-03-11 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 rG807466ef2812: [OpenMP] Restore backwards compatibility for libomptarget (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D97680: [OpenMP] Simplify GPU memory globalization

2021-03-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 330352. jhuber6 added a comment. Herald added a subscriber: ormris. Changed the RTL to have an argument that indicates if there is only one active caller for a team. This makes it easier to optimize. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D114890: [OpenMP] Make the new device runtime the default

2021-12-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, tianshilei1992. Herald added subscribers: dang, kerbowa, guansong, yaxunl, nhaehnle, jvesely. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang

[PATCH] D114890: [OpenMP] Make the new device runtime the default

2021-12-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 391079. jhuber6 added a comment. Fixing driver tests that change with this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114890/new/ https://reviews.llvm.org/D114890 Files: clang/include/clang/Driver/Option

[PATCH] D114890: [OpenMP] Make the new device runtime the default

2021-12-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D114890#3165799 , @ronlieb wrote: > perhaps we can try this patch as is, and if it passes buildbot, let the new > DeviceRTL be the default upstream for all targets. > if it fails the AMDGPU buildbot, then perhaps apply the abo

[PATCH] D114890: [OpenMP] Make the new device runtime the default

2021-12-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D114890#3165879 , @ronlieb wrote: > works for me, i think Greg is ok with it too, we chatted internally an hour > or so ago Should I just land it now and sleep or wait until tomorrow? Whichever causes the least downtime for

[PATCH] D114890: [OpenMP] Make the new device runtime the default

2021-12-02 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 rGc99407e31c39: [OpenMP] Make the new device runtime the default (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D114890: [OpenMP] Make the new device runtime the default

2021-12-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D114890#3167061 , @ronlieb wrote: > thx for trying it out, please revert so we can look into it more on the > AMDGPU target I'm going to make a new revision to make AMDGPU use the old runtime by default, SG? Repository:

[PATCH] D114965: [OpenMP] Remove the new runtime default for AMDGPU

2021-12-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, tianshilei1992, gregrodgers, ronlieb. Herald added subscribers: dang, kerbowa, guansong, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl. jhuber6 requested review of this revision. Herald added subscrib

[PATCH] D114965: [OpenMP] Remove the new runtime default for AMDGPU

2021-12-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I feel like I should make these options only enabled if we're in an OpenMP device. I just realized that this will probably enable it for anything that goes through here, even non-OpenMP. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D114965: [OpenMP] Remove the new runtime default for AMDGPU

2021-12-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D114965#3167241 , @jhuber6 wrote: > I feel like I should make these options only enabled if we're in an OpenMP > device. I just realized that this will probably enable it for anything that > goes through here, even non-OpenMP

[PATCH] D114965: [OpenMP] Remove the new runtime default for AMDGPU

2021-12-02 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 rG96ff74a0d598: [OpenMP] Remove the new runtime default for AMDGPU (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D136111: [OpenMP] Make device functions have hidden visibility

2022-10-18 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbb3c90d3ecd1: [OpenMP] Make device functions have hidden visibility (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136111/new/ https:/

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

2022-10-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D136100#3863427 , @MyDeveloperDay wrote: > Pretty interesting, it looks ok from what I can tell, let the others take a > look Thanks, I was originally hoping I could avoid adding a new boolean for `InPragma` by asking somet

[PATCH] D136198: [OpenMP] Make kernels have protected visibility

2022-10-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, ABataev, JonChesterfield, tianshilei1992, ronlieb. Herald added subscribers: kosarev, mattd, asavonic, guansong, yaxunl, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe

[PATCH] D136198: [OpenMP] Make kernels have protected visibility

2022-10-18 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c1449a84d61: [OpenMP] Make kernels have protected visibility (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136198/new/ https://revie

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

2022-10-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 rG037669de8bdf: [clang-format] Do not parse certain characters in pragma directives (authored by jhuber6). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D136363: [OpenMP] Remove `-Bsymbolic` flag for device linking in the GNU toolchain

2022-10-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, jdoerfert, tianshilei1992. Herald added subscribers: pengfei, guansong, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a p

[PATCH] D136363: [OpenMP] Remove `-Bsymbolic` flag for device linking in the GNU toolchain

2022-10-20 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2a9a13d9cc5f: [OpenMP] Remove `-Bsymbolic` flag for device linking in the GNU toolchain (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D136701: [LinkerWrapper] Perform device linking steps in parallel

2022-10-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, tra, yaxunl, JonChesterfield, ronlieb. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch changes the device li

[PATCH] D136701: [LinkerWrapper] Perform device linking steps in parallel

2022-10-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D136701#3883218 , @tra wrote: > I would argue that parallel compilation and linking may need to be disabled > by default. I believe similar patches were discussed in the past regarding > sub-compilations, but they are relevan

[PATCH] D136701: [LinkerWrapper] Perform device linking steps in parallel

2022-10-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D136701#3883416 , @tra wrote: > In D136701#3883300 , @jhuber6 wrote: > >> However, as an opt-in feature it would be very helpful in some cases. > > I'm OK with the explicit opt-in. Mig

[PATCH] D136715: formatting clang offloadbundler source file

2022-10-25 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/D136715/new/ https://reviews.llvm.org/D136715 ___

[PATCH] D136701: [LinkerWrapper] Perform device linking steps in parallel

2022-10-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 470859. jhuber6 added a comment. Make the default number of threads one, let users use `-Wl,--wrapper-jobs=N` to use parallelism. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136701/new/ https://reviews.llvm.

[PATCH] D136701: [LinkerWrapper] Perform device linking steps in parallel

2022-10-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 470867. jhuber6 added a comment. Herald added a subscriber: mgrang. Adding a sort so the entires appear in a deterministic order. The sort is simply a lexigraphic comparison. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D136796: [llvm-objdump][Offload] Use common offload extraction method

2022-10-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, tra, yaxunl, jdoerfert, tianshilei1992. Herald added a subscriber: hiraditya. Herald added a reviewer: alexander-shaposhnikov. Herald added a reviewer: jhenderson. Herald added a reviewer: MaskRay. Herald added a project: All

[PATCH] D136796: [llvm-objdump][Offload] Use common offload extraction method

2022-10-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 471132. jhuber6 added a comment. Adding separate tests for `ET_REL`, `ET_EXEC`, and `ET_DYN`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136796/new/ https://reviews.llvm.org/D136796 Files: clang/tools/cla

[PATCH] D136701: [LinkerWrapper] Perform device linking steps in parallel

2022-10-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 471994. jhuber6 added a comment. Ping and fix test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136701/new/ https://reviews.llvm.org/D136701 Files: clang/test/Driver/linker-wrapper.c clang/tools/clang-li

[PATCH] D136701: [LinkerWrapper] Perform device linking steps in parallel

2022-10-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:1211-1212 +llvm::sort(Input, [](OffloadingImage &A, OffloadingImage &B) { + return A.StringData["triple"].compare(B.StringData["triple"]) == 1 || + A.StringData

[PATCH] D136701: [LinkerWrapper] Perform device linking steps in parallel

2022-10-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 471998. jhuber6 added a comment. Sorting on offload kind as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136701/new/ https://reviews.llvm.org/D136701 Files: clang/test/Driver/linker-wrapper.c clang/

[PATCH] D136796: [llvm-objdump][Offload] Use common offload extraction method

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

[PATCH] D137180: [LinkerWrapper] report on missing libraries

2022-11-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, tra, JonChesterfield. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The linker wrapper does its own library searching

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

2022-08-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 451875. jhuber6 added a comment. Changing bool usage to use `_Bool` if compiling for C so we don't need to include the extra header for this single declaration. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D129694#3717166 , @ssquare08 wrote: > The OpenMP kernel names you mentioned are also generated separately by the > host and the device. Would you be okay generating declare target mangle names > separately by host and device

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D129694#3718225 , @ssquare08 wrote: > Yes, that is correct. My question is, is it okay to mangle the host and the > device side independently using `getTargetEntryUniqueInfo`? The reason I am > asking is because you had expre

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

2022-08-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 453021. jhuber6 added a comment. Adjusting, adding code generation options for the other constants and changing to use linkonce ODR linkage. I attempted to follow Jon's suggestion and group it with the existing code. but all the existing handling for this o

[PATCH] D129507: [llvm-objcopy] Add option to dump embedded offloading images

2022-08-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 453354. jhuber6 added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Moving to clang packager. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129507/new/ https://reviews.llvm.o

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

2022-08-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 3 inline comments as done. jhuber6 added a comment. Thanks for the comments. Comment at: clang/test/Driver/offload-packager.c:12-14 +// RUN: clang-offload-packager %t.out \ +// RUN: --image=file=%t-sm_70.o,kind=openmp,triple=nvptx64-nvidia-cuda,arch=sm_70 \ +/

[PATCH] D132074: [OpenMP] Add option to assert no nested OpenMP parallelism on the GPU

2022-08-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tianshilei1992, JonChesterfield, jdoerfert, ronlieb, carlo.bertolli, gregrodgers. Herald added subscribers: guansong, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: openmp-commits, cf

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

2022-08-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 2 inline comments as done. jhuber6 added inline comments. Comment at: clang/test/Driver/offload-packager.c:12-14 +// RUN: clang-offload-packager %t.out \ +// RUN: --image=file=%t-sm_70.o,kind=openmp,triple=nvptx64-nvidia-cuda,arch=sm_70 \ +// RUN: --image=fil

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

2022-08-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 453456. jhuber6 edited the summary of this revision. jhuber6 added a comment. Update, still having problems making the test but I figured I'd just update now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129507

[PATCH] D132074: [OpenMP] Add option to assert no nested OpenMP parallelism on the GPU

2022-08-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 453474. jhuber6 added a comment. Tweak ordering of comparisons. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132074/new/ https://reviews.llvm.org/D132074 Files: clang/include/clang/Basic/LangOptions.def c

[PATCH] D132248: [CUDA][OpenMP] Fix the new driver crashing on multiple device-only outputs

2022-08-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tra, yaxunl, JonChesterfield. Herald added subscribers: mattd, guansong. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang

[PATCH] D132248: [CUDA][OpenMP] Fix the new driver crashing on multiple device-only outputs

2022-08-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 454036. jhuber6 added a comment. Forgot to use the new driver in the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132248/new/ https://reviews.llvm.org/D132248 Files: clang/lib/Driver/Driver.cpp clan

[PATCH] D132248: [CUDA][OpenMP] Fix the new driver crashing on multiple device-only outputs

2022-08-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D132248#3735793 , @tra wrote: >> The old driver would put all the outputs in the final action list akin to a >> linker job. > > IIRC that's where HIP and CUDA behaved differently. CUDA compilation does not > allow device-only

[PATCH] D132248: [CUDA][OpenMP] Fix the new driver crashing on multiple device-only outputs

2022-08-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D132248#3735943 , @tra wrote: > In D132248#3735900 , @jhuber6 wrote: > >> Is this an architectural limitation? I'd imagine they'd just behave the same >> way here in my implementation.

[PATCH] D132248: [CUDA][OpenMP] Fix the new driver crashing on multiple device-only outputs

2022-08-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 454076. jhuber6 added a comment. Updating to error with `-o` and multiple files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132248/new/ https://reviews.llvm.org/D132248 Files: clang/lib/Driver/Driver.cpp

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

2022-08-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 454106. jhuber6 added a comment. Using @tra's suggestion to use `cd`. I had to make the test not apply to Windows however, since I had to use `realpath`. But we don't support Windows anyway. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2022-08-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 454108. jhuber6 added a comment. Updating documentation, cleaning up, and adjusting tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129507/new/ https://reviews.llvm.org/D129507 Files: clang/docs/ClangOf

[PATCH] D132074: [OpenMP] Add option to assert no nested OpenMP parallelism on the GPU

2022-08-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D132074#3739593 , @carlo.bertolli wrote: > This looks good, but what happens when the user accidentally adds a nested > parallel when this option is turned on? Do we get serial (correct) execution? With the code as it is, it

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

2022-08-23 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbf062954364d: [OffloadPackager] Add option to extract files from images (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129507/new/ htt

[PATCH] D132248: [CUDA][OpenMP] Fix the new driver crashing on multiple device-only outputs

2022-08-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 454839. jhuber6 added a comment. Adding HIP test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132248/new/ https://reviews.llvm.org/D132248 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/cuda-binding

[PATCH] D132074: [OpenMP] Add option to assert no nested OpenMP parallelism on the GPU

2022-08-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 454845. jhuber6 added a comment. Fix missing `()` in assertion and accidentally deleting device libs addition. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132074/new/ https://reviews.llvm.org/D132074 Files:

[PATCH] D132074: [OpenMP] Add option to assert no nested OpenMP parallelism on the GPU

2022-08-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 rG2b8f722e630d: [OpenMP] Add option to assert no nested OpenMP parallelism on the GPU (authored by jhuber6). Changed prior to commit: https://review

[PATCH] D132248: [CUDA][OpenMP] Fix the new driver crashing on multiple device-only outputs

2022-08-24 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGba57828e11c5: [CUDA][OpenMP] Fix the new driver crashing on multiple device-only outputs (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D130020: [OpenMP] Deprecate the old driver for OpenMP offloading

2022-08-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D130020#3746076 , @MaskRay wrote: > This is "remove" instead of "deprecate"? Yes, "remove" is probably more appropriate as this completely removes support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

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

2022-08-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: saiislam, JonChesterfield, yaxunl, ronlieb, tra, jdoerfert. Herald added a subscriber: mgorny. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: cl

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

2022-08-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D132607#3747394 , @tra wrote: >> Should these be merged into a public interface via Object/OffloadBinary.h? > > I'm all for consolidating relevant code. Basically it would be a free function doing that `extractFromBuffer` does

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

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D131639#3749408 , @ivanrodriguez3753 wrote: > This looks good to me, and I agree we should document what this is fixing. > Any update on if/when this will land? > > In my opinion, there's nothing broken about the user code (d

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

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D131639#3749563 , @ivanrodriguez3753 wrote: > The user didn't define any `__` or `_[A-Z]` identifiers, though? Am I misunderstanding the test input? /* Visual Studio < 2013 does not have stdbool.h so here it is a replaceme

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

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D131639#3749582 , @ivanrodriguez3753 wrote: > They are defining their own `bool`, which aliases to the built-in `_Bool` > (which is reserved, as you noted with `_[A-Z]`). I thought `bool` was fair > game unless they included

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

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, saiislam, JonChesterfield, tra, yaxunl. Herald added subscribers: hiraditya, mgorny. Herald added a project: All. jhuber6 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits,

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

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 455663. jhuber6 added a comment. Updating after refactoring extraction code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132607/new/ https://reviews.llvm.org/D132607 Files: clang/test/Driver/offload-packag

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

2022-08-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 455664. jhuber6 added a comment. CMake changes no longer needed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132607/new/ https://reviews.llvm.org/D132607 Files: clang/test/Driver/offload-packager.c clang/

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

2022-08-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-offload-packager/ClangOffloadPackager.cpp:17-21 +#include "llvm/IR/Constants.h" +#include "llvm/IR/Module.h" +#include "llvm/IRReader/IRReader.h" +#include "llvm/Object/Archive.h" +#include "llvm/Object/ArchiveWriter.h"

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

2022-08-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 455929. jhuber6 added a comment. Removing unused headers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132607/new/ https://reviews.llvm.org/D132607 Files: clang/test/Driver/offload-packager.c clang/tools/

[PATCH] D130020: [OpenMP] Deprecate the old driver for OpenMP offloading

2022-08-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D130020#3752458 , @thakis wrote: > This caused: > > In file included from ../../clang/lib/Driver/ToolChains/Cuda.cpp:9: > ../../clang/lib/Driver/ToolChains/Cuda.h:193:29: warning: private field > 'OK' is not used [-Wunused

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

2022-09-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 3 inline comments as done. jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9449-9450 + !(Features & llvm::AMDGPU::FEATURE_WAVE32) || + llvm::is_contained(CGM.getTarget().getTargetOpts().FeaturesAsWritten, +

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

2022-09-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 460812. jhuber6 added a comment. Addressing comments. 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/lib/CodeGen

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

2022-09-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9468-9472 + AddGlobal("__oclc_wavefrontsize64", Wavefront64, /*Size=*/8); + AddGlobal("__oclc_daz_opt", DenormAreZero, /*Size=*/8); + AddGlobal("__oclc_finite_only_opt", FiniteOnly || RelaxedMath, /*Si

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

2022-09-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9468 + // Control constants for math operations. + AddGlobal("__oclc_wavefrontsize64", Wavefront64, /*Size=*/8); + AddGlobal("__oclc_daz_opt", DenormAreZero, /*Size=*/8); yaxunl wrote:

[PATCH] D134189: [CUDA][HIP] Fix new driver crashing when using -save-temps in RDC-mode

2022-09-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl. Herald added subscribers: kosarev, mattd, kerbowa, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a reviewer: jdoerfert. Hera

[PATCH] D134189: [CUDA][HIP] Fix new driver crashing when using -save-temps in RDC-mode

2022-09-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 461286. jhuber6 added a comment. Mixing the concept of the mask passing via an `unsigned` and a single enum value was incorrect. Add a new interface that accepts a mask and adds all active values instead. Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D134189: [CUDA][HIP] Fix new driver crashing when using -save-temps in RDC-mode

2022-09-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4391 DDep.add(*PackagerAction, *C.getSingleOffloadToolChain(), - nullptr, Action::OFK_None); + nullptr, C.getActiveOffloadKinds()); } -

[PATCH] D134189: [CUDA][HIP] Fix new driver crashing when using -save-temps in RDC-mode

2022-09-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 3 inline comments as done. jhuber6 added inline comments. Comment at: clang/lib/Driver/Action.cpp:320 +if (OKind & Mask) + DeviceOffloadKinds.push_back(OKind); +} tra wrote: > It would be good to clear processed bits in `Mask` and then ass

[PATCH] D134189: [CUDA][HIP] Fix new driver crashing when using -save-temps in RDC-mode

2022-09-19 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb647f13226b4: [CUDA][HIP] Fix new driver crashing when using -save-temps in RDC-mode (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D134189?vs=461286&id=461310#toc Repository:

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: MaskRay, aaron.ballman. Herald added a subscriber: StephenFan. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds an additional check

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D134550#3812369 , @aaron.ballman wrote: > This is a neat idea, but I think we should think about it carefully. In > general, `-Xclang` is not something we want to actively recommend users use, > so do we really want to make

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-24 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe2213159fa65: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D134550#3813259 , @jyknight wrote: > I //really// don't think we should have this behavior. The cc1 options are > supposed to be an internal implementation detail. It's already a problem that > the option name doesn't shout "

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

2022-09-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 462948. jhuber6 added a comment. Adding an extra check in `CodeGenAction.cpp` that forcibly internalizes these if we link in any modules in RDC mode. This is a considerable hack, but should solve the problem. It's not a great solution, so let me know if you

[PATCH] D134660: [LinkerWrapper] Fix optimized debugging builds for NVPTX LTO

2022-09-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, markdewing. Herald added subscribers: mattd, gchakrabarti, asavonic, inglorion. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1

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