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

2022-11-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:1262-1265 +if (identify_magic((*BufferOrErr)->getBuffer()) == +file_magic::elf_shared_object) + continue; + tra wrote: > jhenderson wrote: > > This

[PATCH] D137470: [Offloading] Initial support for registering offloading entries on COFF targets

2022-11-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, jdoerfert, tianshilei1992, JonChesterfield, yaxunl, rnk. Herald added a subscriber: hiraditya. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, sstefan1. Herald

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

2022-11-09 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/D136701/new/ https://reviews.llvm.org/D136701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D137154#3917752 , @tra wrote: > As for the code specialization, why not build for individual GPUs? To me it > looks like this use case is a good match for the "new-driver" offloading > that's been recently implemented in clan

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D137154#3918949 , @bader wrote: > Is binary size a concern here? NVIDIA, AMD and Intel GPUs are already have ~ > 20 different architectures each, so I want my app/library to run on any GPU > from these vendors (which is quite

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

2022-11-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. @dhruvachak Do you still need help updating the LLVM tests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102107/new/ https://reviews.llvm.org/D102107 ___ cfe-commits mailing lis

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

2022-11-11 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0f7e8631547a: [LinkerWrapper] Perform device linking steps in parallel (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136701/new/ http

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

2022-11-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D102107#3922842 , @dhruvachak wrote: > In D102107#3921948 , @jhuber6 wrote: > >> @dhruvachak Do you still need help updating the LLVM tests? > > If you go a few messages back, there ar

[PATCH] D137649: [Clang][OpenMP] Warn and discard write to host for const variable

2022-11-14 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, others feel free to comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137649/new/ https://reviews.llvm.org/D137649 ___

[PATCH] D137470: [Offloading] Initial support for registering offloading entries on COFF targets

2022-11-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Thanks for the feedback. Another significant portion of getting this workflow to work for Windows / COFF is parsing the linker arguments. I should be able to look at `lld-link` and add necessarily aliases to what `ld.lld` takes I assume? E.g. we use values like `-o` an

[PATCH] D137470: [Offloading] Initial support for registering offloading entries on COFF targets

2022-11-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D137470#3928828 , @mstorsjo wrote: > Sorry, I'm not quite up to speed with exactly what is being done linker-wise > here - can you give a more detailed overview? Keep in mind that there's two > separate interfaces to lld for

[PATCH] D84743: [Clang][AMDGCN] Universal device offloading macros header

2022-11-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. This might be useful in the context of generating multi-architecture libraries when we start writing `libc` and `libc++` functionality. Although I can't name any use-cases for certain right now. However, shouldn't we just be able to define these in `clang` along similar

[PATCH] D142484: [LinkerWrapper] Only import static libraries with needed symbols

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, tra, yaxunl. Herald added a subscriber: kosarev. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: openmp-commits, cfe-commits, sstefan1. Herald added

[PATCH] D142486: [OpenMP] Unconditionally link the OpenMP device RTL static library

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield. Herald added subscribers: guansong, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: c

[PATCH] D142491: [OpenMP] Do not link the bitcode OpenMP runtime when targeting AMDGPU.

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, ronlieb, gregrodgers, jplehr. Herald added subscribers: kosarev, kerbowa, guansong, tpr, dstuttard, yaxunl, jvesely, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision

[PATCH] D142484: [LinkerWrapper] Only import static libraries with needed symbols

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D142484#4077811 , @tra wrote: > @MaskRay - we seem to be reinventing the linker here and could use your > expertise. Yeah, this reinvents a lot of logic. But I don't think there's an easy way to get around this without dupli

[PATCH] D142484: [LinkerWrapper] Only import static libraries with needed symbols

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:1217-1218 +/// 1) It defines an undefined symbol in a regular object filie. +/// 2) It defines a global symbol without hidden visibility that has not +/// yet been defined.

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141717#4074842 , @yaxunl wrote: > Can we keep the original behaviour for the old driver for HIP? Only enable > the change for the new driver. That's probably fair because AFAIK that will still use the `clang-offload-bundler

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 491866. jhuber6 added a comment. Exempting HIP using the old driver. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141717/new/ https://reviews.llvm.org/D141717 Files: clang/lib/Driver/Driver.cpp clang/test

[PATCH] D142484: [LinkerWrapper] Only import static libraries with needed symbols

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added a comment. In D142484#4077979 , @tra wrote: > We could also use more test cases. E.g. weak symbols (should not cause object > extraction) Yeah, I'll try to add a reasonable test here. It's a little

[PATCH] D142484: [LinkerWrapper] Only import static libraries with needed symbols

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 491883. jhuber6 added a comment. Adding test and making the logic a bit more readable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142484/new/ https://reviews.llvm.org/D142484 Files: clang/test/Driver/link

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-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 rGd50dacd7c3c2: [Clang] Only emit textual LLVM-IR in device only mode (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D142491: [OpenMP] Do not link the bitcode OpenMP runtime when targeting AMDGPU.

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D142491#4078400 , @arsenm wrote: > Well the library still doesn't 100% work unless using -mlink-builtin-bitcode. > It's taking forever to make progress on fixing that This is the OpenMP DeviceRTL, the AMD one is still shoved

[PATCH] D142484: [LinkerWrapper] Only import static libraries with needed symbols

2023-01-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added a comment. In D142484#4078377 , @tra wrote: > LGTM. Please wait a bit before landing it, in case @MaskRay has something to > say. I'm somewhat hoping to get this in before the fork that happens in

[PATCH] D142484: [LinkerWrapper] Only import static libraries with needed symbols

2023-01-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. jhuber6 marked an inline comment as done. Closed by commit rG1964c334782e: [LinkerWrapper] Only import static libraries with needed symbols (authored by jhuber6). Chan

[PATCH] D142486: [OpenMP] Unconditionally link the OpenMP device RTL static library

2023-01-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 rGdc60f7aa0435: [OpenMP] Unconditionally link the OpenMP device RTL static library (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D142491: [OpenMP] Do not link the bitcode OpenMP runtime when targeting AMDGPU.

2023-01-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 rG5d1dc9fa043f: [OpenMP] Do not link the bitcode OpenMP runtime when targeting AMDGPU. (authored by jhuber6). Repository: rG LLVM Github Monorepo C

[PATCH] D142484: [LinkerWrapper] Only import static libraries with needed symbols

2023-01-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D142484#4079869 , @Jake-Egan wrote: > Hi, this new test fails on AIX. Could you take a look? > https://lab.llvm.org/buildbot/#/builders/214/builds/5477/steps/6/logs/FAIL__Clang__linker-wrapper-libs_c I'm actually not sure why

[PATCH] D142484: [LinkerWrapper] Only import static libraries with needed symbols

2023-01-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D142484#4079869 , @Jake-Egan wrote: > Hi, this new test fails on AIX. Could you take a look? > https://lab.llvm.org/buildbot/#/builders/214/builds/5477/steps/6/logs/FAIL__Clang__linker-wrapper-libs_c I might just put that this

[PATCH] D142570: [nvptx-arch] Remove `find_package(CUDA)` as it has been deprecated.

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

[PATCH] D142570: [nvptx-arch] Remove `find_package(CUDA)` as it has been deprecated.

2023-01-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 rG759dec253695: [nvptx-arch] Remove `find_package(CUDA)` as it has been deprecated. (authored by jhuber6). Repository: rG LLVM Github Monorepo CHAN

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

2023-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D140158#4082789 , @alexfh wrote: > This patch breaks our cuda compilations. The output file isn't created after > it: > > $ echo 'extern "C" __attribute__((global)) void q() {}' >q.cc > $ good-clang \ > -nocudainc -x

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I'm not overly familiar with HLSL or DirectX here. Most of the changes are purely mechanical, but I don't see anywhere we create the tool. Does that come later? Normally you'd test these with `-ccc-print-bindings`, `-ccc-print-bindings`, and `-###`.

[PATCH] D142650: [OpenMP] Run an extra 'OpenMPOpt' pass in LTO-mode

2023-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, ronlieb, ye-luo, fhahn. Herald added subscribers: StephenFan, guansong, hiraditya, inglorion, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added a reviewer:

[PATCH] D142650: [OpenMP] Run an extra 'OpenMPOpt' pass in LTO-mode

2023-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 492498. jhuber6 added a comment. Herald added subscribers: ormris, steven_wu. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142650/new/ https://reviews.llvm.org/D142650 Files: clang/tools/clang-link

[PATCH] D142650: [OpenMP] Run an extra 'OpenMPOpt' pass in LTO-mode

2023-01-26 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 rG6185246f4f62: [OpenMP] Run an extra 'OpenMPOpt' pass in LTO-mode (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D142650?

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4216 + llvm::Triple T(getTargetTriple()); + if (T.getArch() == llvm::Triple::dxil && !Args.getLastArg(options::OPT_dxc_disable_validation)) { +// Only add action when 'dxv' exists. Coul

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4214-4216 + // Call validator for dxil when -Vd not in Args. + llvm::Triple T(getTargetTriple()); + if (T.getArch() == llvm::Triple::dxil) { Comment at: clang/lib/Driver

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4218 +// Only add action when needValidation. +if (toolchains::HLSLToolChain::needValidation(Args, *this, + C.getDefaultToolChain())) {

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/Driver/dxc_dxv_path.hlsl:19-23 +// PHASES:+- 0: input, "[[INPUT:.+]]", hlsl +// PHASES:+- 1: preprocessor, {0}, c++-cpp-output +// PHASES:+- 2: compiler, {1}, ir +// PHASES:3: backend, {2}, assembler +// PHASES:4: binary-analy

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4217-4218 +// Only add action when needValidation. +const auto &TC = getToolChain(Args, C.getDefaultToolChain().getTriple()); +const auto *HLSLTC = static_cast(&TC); +if (HLSLTC->needValidation

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Thanks for the changes. Comment at: clang/lib/Driver/Driver.cpp:4226 +Args.ClaimAllArgs(options::OPT_cl_ignored_Group); + } nit. remember to `clang-format` Comment at: clang/lib/Driver/ToolChains/HLSL.cpp:170 +

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/HLSL.cpp:170 + +Tool *clang::driver::toolchains::HLSLToolChain::getTool( +Action::ActionClass AC) const { python3kgae wrote: > jhuber6 wrote: > > I feel like this logic should go with the

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-27 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 overall. Thanks for the patch. Others feel free to comment. Comment at: clang/lib/Driver/Driver.cpp:4214 } - + // Call validator for dxil when -Vd not in Args. +

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4091383 , @srj wrote: > It looks like this change (but not the rG4ce454c654bd > ) is in > the 17 branch, as the latter is now failing in the same wa

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4091408 , @srj wrote: > In D141861#4091403 , @jhuber6 wrote: > >> In D141861#4091383 , @srj wrote: >> >>> It looks like this change (bu

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4091851 , @srj wrote: >> https://github.com/llvm/llvm-project/commit/759dec253695f38a101c74905c819ea47392e515. >> Does it work if you revert this? I wouldn't think it wouldn't affect >> anything. That's the only chang

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4091897 , @srj wrote: > It's finding a 64-bit CUDAToolkit, which it can't link against because the > rest of the build is 32-bit. Wondering why it didn't find it before then. But that's definitely a weird configurati

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4091922 , @srj wrote: > Crosscompiling to x86-32 on an x86-64 host doesn't strike me as particularly > weird at all (especially on Windows), but apparently it is quite weird for > LLVM at this point in time as we keep

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4091961 , @srj wrote: > In D141861#4091949 , @jhuber6 wrote: > >> In D141861#4091922 , @srj wrote: >> >>> Crosscompiling to x86-32 on a

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4092182 , @srj wrote: > In D141861#4092096 , @srj wrote: > >> Update: I may have a way to make this work from my side; testing now. > > Alas, that didn't work, stlll broken. In

[PATCH] D142985: [LinkerWrapper] Fix memory issues due to unguarded accesses to global state

2023-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: uabelho. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There were intemittent errors in the linker wrapper when using the sanitizers in parallel

[PATCH] D142985: [LinkerWrapper] Fix memory issues due to unguarded accesses to global state

2023-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. If this fixes the issues on your side, please open a bug so it can be backported. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142985/new/ https://reviews.llvm.org/D142985 ___

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4094036 , @srj wrote: > In D141861#4092237 , @tra wrote: > >> For what it's worth, NVIDIA has started deprecating 32-bit binaries long ago >> (https://forums.developer.nvidia.c

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4094058 , @srj wrote: > In D141861#4094043 , @jhuber6 wrote: > >> Would this just require checking `LLVM_BUILD_32_BITS`? Should be an easy >> change. > > I think so. (It might

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4094063 , @srj wrote: > Yes please! Let me know if this fixes anything rG9f64fbb882dc . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D142999: [Clang] Adjust PIC handling for the AMDGPU ToolChain

2023-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: arsenm, JonChesterfield, yaxunl, t-tye, msearles. 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, Mas

[PATCH] D142999: [Clang] Adjust PIC handling for the AMDGPU ToolChain

2023-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.h:71 } - bool isPICDefaultForced() const override { return false; } + bool isPICDefaultForced() const override { return true; } bool SupportsProfiling() const override { return false; }

[PATCH] D142999: [Clang] Adjust PIC handling for the AMDGPU ToolChain

2023-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 rG9271c5da434b: [Clang] Adjust PIC handling for the AMDGPU ToolChain (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D142985: [LinkerWrapper] Fix memory issues due to unguarded accesses to global state

2023-02-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D142985#4095701 , @uabelho wrote: > I wrote > https://github.com/llvm/llvm-project/issues/60437 Great, I'll land it once the patch is accepted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D142985: [LinkerWrapper] Fix memory issues due to unguarded accesses to global state

2023-02-01 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 rG9c4591d7f3ac: [LinkerWrapper] Fix memory issues due to unguarded accesses to global state (authored by jhuber6). Repository: rG LLVM Github Monore

[PATCH] D143325: [Driver] Add -mllvm= as an alias for -mllvm

2023-02-04 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. This looks good. I've had similar problems when trying to pass things with arguments via the `-Xarch` or `-Xopenmp-target=` options. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D141543: [LinkerWrapper] Emit assembly files from LTO with `save-temps`

2023-01-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, arsenm, tianshilei1992. Herald added a subscriber: inglorion. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, wdng. Herald added a project: clang. Curr

[PATCH] D141543: [LinkerWrapper] Emit assembly files from LTO with `save-temps`

2023-01-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 488361. jhuber6 added a comment. Herald added a subscriber: sstefan1. Add test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141543/new/ https://reviews.llvm.org/D141543 Files: clang/test/Driver/linker-wrap

[PATCH] D141543: [LinkerWrapper] Emit assembly files from LTO with `save-temps`

2023-01-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:531-537 + CmdArgs.push_back(*ClangPath); + CmdArgs.push_back("-o"); + CmdArgs.push_back(*TempFileOrErr); + CmdArgs.push_back("-fPIC"); + CmdArgs.push_back("-c"); + CmdArgs.pus

[PATCH] D141105: [OpenMP] Add support for '--offload-arch=native' to OpenMP offloading

2023-01-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141105#4046400 , @gribozavr2 wrote: > FYI: I fixed the problem in > https://github.com/llvm/llvm-project/commit/0a11a1b1868dd2ab183c4313ccbfbe126e91ca08. Thanks, I forgot to update that test after fixing a similar problem b

[PATCH] D141543: [LinkerWrapper] Emit assembly files from LTO with `save-temps`

2023-01-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 488679. jhuber6 added a comment. Fix test, should be good to go now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141543/new/ https://reviews.llvm.org/D141543 Files: clang/test/Driver/linker-wrapper.c cla

[PATCH] D141543: [LinkerWrapper] Emit assembly files from LTO with `save-temps`

2023-01-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 488690. jhuber6 added a comment. Changing to initializer list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141543/new/ https://reviews.llvm.org/D141543 Files: clang/test/Driver/linker-wrapper.c clang/too

[PATCH] D141543: [LinkerWrapper] Emit assembly files from LTO with `save-temps`

2023-01-12 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 rG9e239fc487d5: [LinkerWrapper] Emit assembly files from LTO with `save-temps` (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D141051: [CUDA][HIP] Add support for `--offload-arch=native` to CUDA and refactor

2023-01-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141051#4048456 , @srj wrote: > For reasons that aren't yet clear to me, this change is failing to compile > when using gcc-7 and targeting 32-bit targets; the error is of the form > > AMDGPU.cpp:773:10: error: could not con

[PATCH] D141051: [CUDA][HIP] Add support for `--offload-arch=native` to CUDA and refactor

2023-01-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141051#4048456 , @srj wrote: > For reasons that aren't yet clear to me, this change is failing to compile > when using gcc-7 and targeting 32-bit targets; the error is of the form > > AMDGPU.cpp:773:10: error: could not con

[PATCH] D141543: [LinkerWrapper] Emit assembly files from LTO with `save-temps`

2023-01-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141543#4050080 , @thakis wrote: > Looks like this breaks tests on Windows: > http://45.33.8.238/win/73276/step_7.txt > > Please take a look and revert for now if it takes a while to fix. Yes, seems I forgot that `clang` is `

[PATCH] D141543: [LinkerWrapper] Emit assembly files from LTO with `save-temps`

2023-01-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141543#4050174 , @thakis wrote: > Thanks! Still failing with that though: > http://45.33.8.238/win/73278/step_7.txt Hm, I'm unsure what would be causing that. I could always just disable the test on Windows. This program is

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

2023-01-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D140226#4052105 , @aaron.ballman wrote: > Precommit CI found failures that look relevant to the patch. > >> We may want to be able to mark certain regions as kernels even without being >> in an accepted CUDA or OpenCL languag

[PATCH] D141708: [OpenMP] Make `-fopenmp-target=` use the `nvptx-arch` tool

2023-01-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tianshilei1992, jdoerfert, tra. Herald added subscribers: kosarev, mattd, gchakrabarti, asavonic, guansong, tpr, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1,

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, tra, yaxunl, JonChesterfield. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. Currently, we embed dev

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141717#4052514 , @tra wrote: > Textual output for "-S -emit-llvm" is the canonical behavior, so I would > prefer it working that way in as many cases as possible and only override it > when necessary. > > Would it be possibl

[PATCH] D141723: [Clang] Remove `CLANG_OPENMP_NVPTX_DEFAULT_ARCH` CMake option.

2023-01-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tra, yaxunl, JonChesterfield, MaskRay, mgorny, tstellar. Herald added subscribers: mattd, gchakrabarti, asavonic, guansong. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-comm

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141717#4052753 , @tra wrote: > In D141717#4052587 , @jhuber6 wrote: > >> Well you'll get textual output for the host output, but the device code >> embedded in the host module will be

[PATCH] D141708: [OpenMP] Make `-fopenmp-target=` use the `nvptx-arch` tool

2023-01-13 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG52b9a3974244: [OpenMP] Make `-fopenmp-target=` use the `nvptx-arch` tool (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141708/new/ ht

[PATCH] D141723: [Clang] Remove `CLANG_OPENMP_NVPTX_DEFAULT_ARCH` CMake option.

2023-01-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 rGd1f4bfd2a8b0: [Clang] Remove `CLANG_OPENMP_NVPTX_DEFAULT_ARCH` CMake option. (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141717#4052986 , @tra wrote: > In D141717#4052824 , @jhuber6 wrote: > >> For `-E` we don't embed anything, > > That was just an exaggerated example of top-level options affecting > su

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141717#4053164 , @tra wrote: >> So are you suggesting that we complete the whole pipeline? So -S -emit-llvm >> gives host IR, but the device will go all the way to object? > > That would match my expectations and would solve

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I made the phases always go to `Assemble` but it didn't make a difference. We still get the textual IR here without the exception I added. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141717/new/ https://reviews.llvm.org/

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

2023-01-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 489554. jhuber6 added a comment. Updating. Used a different method to determine if we need to use `.cubin` or `.o`. It's a little ugly but I don't think there's a better way to do it. Also I just realized that if this goes through I could probably heavily s

[PATCH] D141859: [amdgpu-arch] Dynamically load the HSA runtime if not found during the build

2023-01-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, tra, yaxunl, JonChesterfield, gregrodgers. Herald added subscribers: kosarev, kerbowa, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscrib

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, tra, yaxunl, JonChesterfield. Herald added subscribers: mattd, gchakrabarti, asavonic. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jholewinski. Hera

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141717#4056971 , @yaxunl wrote: > The intention of -emit-llvm -S is usually to get LLVM assembly for all > targets for inspection or modification. HIP emits a bundled LLVM assembly in > textual format in this case. Users can

[PATCH] D141859: [amdgpu-arch] Dynamically load the HSA runtime if not found during the build

2023-01-16 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 rGf6ace23172e5: [amdgpu-arch] Dynamically load the HSA runtime if not found during the build (authored by jhuber6). Changed prior to commit: https:/

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-16 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 rG9954516ffb10: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build (authored by jhuber6). Changed prior to commit: https:/

[PATCH] D141935: [OpenMP] Make `-Xarch_host` and `-Xarch_device` for for OpenMP offloading

2023-01-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, tra, yaxunl. Herald added a subscriber: guansong. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. Clan

[PATCH] D141935: [OpenMP] Make `-Xarch_host` and `-Xarch_device` work for OpenMP offloading

2023-01-17 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 rGeec516a0954a: [OpenMP] Make `-Xarch_host` and `-Xarch_device` work for OpenMP offloading (authored by jhuber6). Repository: rG LLVM Github Monorep

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4060028 , @srj wrote: > This change appears to have broken the build when crosscompiling to x86-32 on > a Linux x86-64 system; on the Halide buildbots, we now fail at link time with > > FAILED: bin/nvptx-arch > :

[PATCH] D141861: [nvptx-arch] Dynamically load the CUDA runtime if not found during the build

2023-01-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D141861#4060028 , @srj wrote: > This change appears to have broken the build when crosscompiling to x86-32 on > a Linux x86-64 system; on the Halide buildbots, we now fail at link time with > > FAILED: bin/nvptx-arch > :

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

2023-01-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:448-450 + // If we are invoking `nvlink` internally we need to output a `.cubin` file. + // Checking if the output is a temporary is the cleanest way to determine + // this. Putting this logic in `

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

2023-01-18 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.h:196-197 + + void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; ---

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

2023-01-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 490317. jhuber6 added a comment. Addressing some comments. I don't know if there's a cleaner way to mess around with the `.cubin` nonsense. I liked symbolic links but that doesn't work on Windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

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

2023-01-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 3 inline comments as done. jhuber6 added a comment. In D140158#4063720 , @tra wrote: > LGTM with few minor nits and questions. > > In D140158#4063689 , @jhuber6 wrote: > >> Addressing some comments.

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

2023-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. jhuber6 marked 3 inline comments as done. Closed by commit rG0660397e6809: [CUDA] Allow targeting NVPTX directly without a host toolchain (authored by jhuber6). Change

[PATCH] D142075: [Clang][OpenMP] Allow `f16` literal suffix when compiling OpenMP target offloading for NVPTX

2023-01-18 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. Seems reasonable, maybe update the comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142075/new/ https://reviews.llvm.org/D142075 __

<    4   5   6   7   8   9   10   11   12   13   >