[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:

[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:

[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] 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:

[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:

[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/

[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:

[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

[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

[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

[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

[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

[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

[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

[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

[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] 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

[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

[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

[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

[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:

[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:

[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

[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] 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:

[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:

[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
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

[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

[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: >

[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] D117049: [OpenMP] Add support for embedding bitcode images in wrapper tool

2022-01-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 404785. jhuber6 added a comment. Removing clang flag because LTO won't be supported when these land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117049/new/ https://reviews.llvm.org/D117049 Files:

[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] =

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

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 rG19fac745e322: [OpenMP] Remove call to clang-offload-wrapper binary (authored by jhuber6). Changed prior to commit:

[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

[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

[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] 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] D116975: [OpenMP] Initial Implementation of LTO and bitcode linking in linker wrapper

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 rGc732c3df749b: [OpenMP] Initial Implementation of LTO and bitcode linking in linker wrapper (authored by jhuber6). Changed prior to commit:

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

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 rG3762111aa960: [OpenMP] Link the bitcode library late for device LTO (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D117049: [OpenMP] Add support for embedding bitcode images in 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 rGf28c3153ee6d: [OpenMP] Add support for embedding bitcode images in wrapper tool (authored by jhuber6). Repository: rG LLVM Github Monorepo

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

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 rGb8239af0eeed: [OpenMP] Add support for extracting device code in linker wrapper (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D116627: [Clang] Initial support for linking offloading code in 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 rGd0744585f9ea: [Clang] Initial support for linking offloading code in tool (authored by jhuber6). Changed prior to commit:

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

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. jhuber6 marked an inline comment as done. Closed by commit rGcb7cfaec7185: [OpenMP] Add extra flag handling to linker wrapper (authored by jhuber6). Repository: rG

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

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 rGce16ca3c7419: [OpenMP] Add support for linking AMDGPU images (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

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 rG46d019041cd9: [OpenMP] Improve symbol resolution for OpenMP Offloading LTO (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES

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

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 rGeb6ddf288cd0: [OpenMP] Replace sysmtem call to `llc` with target machine (authored by jhuber6). Changed prior to commit:

[PATCH] D116675: [OpenMP] Search for static libraries in offload linker 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 rG0e82c7553be9: [OpenMP] Search for static libraries in offload linker tool (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES

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

2022-02-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D116541#3287379 , @thakis wrote: > Just build and run tests on any mac. This fails on 3 different macs I tried > (2x arm, 1x intel), in a bunch of different build configs. > > For the particular build I sent the output from,

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

2022-02-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Removed the two lines in rG28c15341368b , let me know if this lets the tests pass. I'll look into getting an access somehow so I can reproduce this and figure it out. Repository: rG LLVM Github

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

2022-02-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D116541#3287330 , @thakis wrote: > Tests have been failing on Mac for over 20 hours now. Time to revert and fix > async? > >% bin/clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda > -fopenmp-new-driver

[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

[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/

[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] D117362: [OpenMP] Remove hidden visibility for declare target variables

2022-01-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: 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 changes the visiblity of variables

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

2022-01-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 400137. jhuber6 added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix test and add the fact that its hidden to the comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[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

[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

[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] Dont pass empty files to nvlink (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D11/new/

[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

[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

[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

[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] 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");

[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:

[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] 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 >

[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

[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

[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] 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=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:

[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

[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:

[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

[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

[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

[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:

[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

[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

[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:

[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

[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

[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

[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.

[PATCH] D122760: [OpenMP] Add OpenMP variant extension to keep the unmangled name

2022-04-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 420604. jhuber6 added a comment. Updating to stop erroring if a function with the same mangled error exists, but is never emitted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122760/new/

[PATCH] D122760: [OpenMP] Add OpenMP variant extension to keep the unmangled name

2022-04-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 420608. jhuber6 added a comment. Make suggested changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122760/new/ https://reviews.llvm.org/D122760 Files: clang/include/clang/Basic/Attr.td

[PATCH] D122760: [OpenMP] Add OpenMP variant extension to keep the unmangled name

2022-04-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3062 +if (auto *A = Global->getAttr()) + VariantGlobalsEmitted.insert(A->getFunction()); } jdoerfert wrote: > This looks like you

[PATCH] D123325: [Clang] Make enabling the new driver more generic

2022-04-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 421595. jhuber6 added a comment. Fix misplaced logic symbol that broke tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123325/new/ https://reviews.llvm.org/D123325 Files:

[PATCH] D123325: [Clang] Make enabling the new driver more generic

2022-04-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 421607. jhuber6 added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123325/new/ https://reviews.llvm.org/D123325 Files: clang/include/clang/Driver/Compilation.h

[PATCH] D120273: [OpenMP] Allow CUDA to be linked with OpenMP using the new driver

2022-04-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 421555. jhuber6 added a comment. Update handling for fatbinaries. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120273/new/ https://reviews.llvm.org/D120273 Files:

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D123471#3446464 , @tra wrote: > I've mentioned in D123441 that it would be > useful to have a list of GPU-side symbols needed by the host and this offload > info is pretty close to what we

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D123471#3446751 , @yaxunl wrote: > HIP is considering a unified device binary embedding scheme with OpenMP. > However, some large MI frameworks are compiled with -fno-gpu-rdc. If > compiling with -fgpu-rdc, the linking time

[PATCH] D120272: [CUDA] Add driver support for compiling CUDA with the new driver

2022-04-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 421270. jhuber6 added a comment. Make `-foffload-new-driver` imply GPU-RDC mode, it won't work otherwise. Also adjust tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120272/new/

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