[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: jdoerfert. jhuber6 added projects: OpenMP, clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits, sstefan1. jhuber6 edited the summary of this revision. This patch changes Clang to generate runtime functions from the information

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 3 inline comments as done. jhuber6 added a comment. Here's the tests it fails, there might be a few that are wrong for reasons beyond the size_t stuff but it's hard to tell until that issue is resolved. The cuda test is just because I have CUDA set up incorrectly on my machine,

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:244 -// TODO: Replace this with the real size_t type -#define __OMP_SIZE_TYPE(NAME) OMP_TYPE(NAME, Type::getInt64Ty(Ctx)) +#define

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 2 inline comments as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:203 + static Function *getOrCreateRuntimeFunction(Module , + omp::RuntimeFunction FnID);

[PATCH] D88929: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by Default

2020-10-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt:80 + else() +list(APPEND compute_capabilities ${CMAKE_MATCH_1}) + endif() ye-luo wrote: > 1. Doesn't work right now. Missing comma

[PATCH] D88929: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by Default

2020-10-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 296577. jhuber6 added a comment. Removing redundant call to `find_package`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88929/new/ https://reviews.llvm.org/D88929 Files: clang/CMakeLists.txt

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-10-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 297003. jhuber6 added a subscriber: ABataev. jhuber6 added a comment. Removing the _loc suffix. The Mapper API hasn't been officially released in Clang 11.x so we're still free to make changes. Currently working on augmenting the mapper API with variable

[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

2020-10-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 297008. jhuber6 added a comment. Updating tests after landing D88594 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88430/new/ https://reviews.llvm.org/D88430 Files:

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-10-08 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd564409946a5: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by… (authored by jhuber6). Herald added a subscriber: mgorny. Changed prior to commit:

[PATCH] D88929: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by Default

2020-10-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 closed this revision. jhuber6 added a comment. Screwed up and put the wrong revision in the commit message. Closed in rGd564409946a5a13cb6391fc0fec54dcbd6f6d249 Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 296778. jhuber6 added a comment. Changed method for comparing the architectures. Enum is local to the loop so it shouldn't pollute the namespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88594/new/

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 296748. jhuber6 added a comment. Removing the architecture detection from lit. Simply changing the tests to use specific architectures, in this case x86_64 and aarch64. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3209-3214 + else if ((T.isArch64Bit() && TT.isArch32Bit()) || + (T.isArch64Bit() && TT.isArch16Bit()) || + (T.isArch32Bit() && TT.isArch64Bit()) || +

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3209-3214 + else if ((T.isArch64Bit() && TT.isArch32Bit()) || + (T.isArch64Bit() && TT.isArch16Bit()) || + (T.isArch32Bit() && TT.isArch64Bit()) || +

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3209-3214 + else if ((T.isArch64Bit() && TT.isArch32Bit()) || + (T.isArch64Bit() && TT.isArch16Bit()) || + (T.isArch32Bit() && TT.isArch64Bit()) || +

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 296783. jhuber6 added a comment. Okay, I'll push it after this finishes its build and see if buildbot sends me angry emails again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88594/new/

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-10-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 reopened this revision. jhuber6 added a comment. This revision is now accepted and ready to land. Closed accidentally, had the wrong revision link in another patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 296204. jhuber6 added a comment. Changing method of determining architecture. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88594/new/ https://reviews.llvm.org/D88594 Files:

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 296081. jhuber6 added a comment. Changed the lit substitution to be for fixing this problem specifically. It made the tests too unreadable and wasn't a good solution since it didn't detect 16 bit architectures anyway. Repository: rG LLVM Github Monorepo

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-10-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 297661. jhuber6 added a subscriber: tianshilei1992. jhuber6 added a comment. Current build, fails `offloading/target_depend_nowait` for an unknown reason after calling cuStreamSynchronize in __tgt_target_teams_mapper_nowait. Repository: rG LLVM Github

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-10-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D87946#2325934 , @grokos wrote: > In D87946#2325756 , @jhuber6 wrote: > >> Current build, fails `offloading/target_depend_nowait` for an unknown reason >> after calling

[PATCH] D89696: [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts

2020-10-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, guansong, yaxunl. Herald added a project: clang. jhuber6 requested review of this revision. Herald added a subscriber: sstefan1. The changes made in D88594

[PATCH] D89696: [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts

2020-10-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 299081. jhuber6 added a comment. Checking tests again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89696/new/ https://reviews.llvm.org/D89696 Files: clang/test/OpenMP/driver-openmp-target.c

[PATCH] D89696: [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts

2020-10-19 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG24df30efda61: [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89696/new/

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-10-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 297297. jhuber6 added a comment. Fixing tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/ https://reviews.llvm.org/D87946 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D88929: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by Default

2020-10-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D88929#2315451 , @ye-luo wrote: > I just realized that this patch affects clang and libomptarget. > I cannot comment on clang. Regarding libomptarget, Could you explain why the > detection is not put together with other cuda

[PATCH] D88929: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by Default

2020-10-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D88929#2315519 , @ye-luo wrote: > Probably not messing with `enable_language(CUDA)` at the moment, just add > `cuda_select_nvcc_arch_flags(CUDA_ARCH_FLAGS)` to >

[PATCH] D88929: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by Default

2020-10-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 296792. jhuber6 added a comment. Implementing Ye's code. I changed it to putput the architecture as a dependency and then set the value where we define the default architecture. I did a full build from scratch using this and got the sm_70 libraries for my

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-05 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 rGeaf73293cb6b: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload (authored by jhuber6). Repository: rG LLVM Github

[PATCH] D88929: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by Default

2020-10-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D88929#2315402 , @ye-luo wrote: > The link I posted indicated that independent feature is merged since 3.12. > Better to avoid deprecated stuff when introducing new cmake lines even though > some existing lines may still rely

[PATCH] D88929: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by Default

2020-10-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: jdoerfert. jhuber6 added projects: clang, OpenMP. Herald added subscribers: openmp-commits, cfe-commits, guansong, yaxunl, mgorny. jhuber6 requested review of this revision. Herald added a subscriber: sstefan1. This patch changes the CMake

[PATCH] D88929: [OpenMP] Change CMake Configuration to Build for Highest CUDA Architecture by Default

2020-10-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D88929#2315378 , @ye-luo wrote: > FindCUDA has been deprecated. > Please explore the following feature without directly calling FindCUDA. > https://gitlab.kitware.com/cmake/cmake/-/merge_requests/1856 Finding architectures

[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

2020-09-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 295032. jhuber6 added a reviewer: erichkeane. jhuber6 added a comment. Adding test cases for incompatible architecture messages. Checking the architecture is done by checking all combinations of architectures. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 295120. jhuber6 added a comment. Adding check for Windows file path. Updating some files after rebasing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/ https://reviews.llvm.org/D87946 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 293725. jhuber6 added a comment. Fixed not passing mappers to new functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/ https://reviews.llvm.org/D87946 Files:

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 293748. jhuber6 added a comment. Changing legacy nowait calls to use the new function interface. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/ https://reviews.llvm.org/D87946 Files:

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D87946#2289959 , @grokos wrote: > Yes, this used to be a point of contention within the community. We discussed > the issue sometime ago and the majority of developers was in favor of this > approach (as opposed to e.g.

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D87946#2286406 , @grokos wrote: > In D87946#2286024 , @jhuber6 wrote: > >> Added ident_t structs to additional runtime functions. > > Why are we adding the extra parameter to those

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 294296. jhuber6 added a comment. Added definition for the ident_t struct from kmp.h along with a method to extract the source location information. Checking the target outcome now prints the file location if ident_t location is available. Repository: rG

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 294352. jhuber6 added a comment. Adding message to build with debugging symbols if source location is not found. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/ https://reviews.llvm.org/D87946 Files:

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Should we wait until the next OpenMP LLVM meeting to push this? Comment at: openmp/libomptarget/include/Ident.h:48-51 +auto removePath = [](const std::string ) { +std::size_t pos = path.rfind('/'); +return path.substr(pos + 1); +

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D87946#2286434 , @grokos wrote: > Correct, all `__tgt_target_*` functions not ending in `_mapper` are part of > the old interface and we are keeping them for compatibility with older > versions of clang. These older clang

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 293550. jhuber6 added a comment. Updated runtime library to have legacy calls into the new functions with source location information. Because the library interface requires C function naming this required adding a suffix to all the functions clang

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 293220. jhuber6 added a comment. Herald added subscribers: aaron.ballman, hiraditya. Fixed failing tests from OpenMPOpt. Formatted files which results in a lot of changes showing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 293238. jhuber6 added a comment. Added ident_t structs to additional runtime functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/ https://reviews.llvm.org/D87946 Files:

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Yeah, I did clang-format since the last patch complained about some formatting in the linter. Didn't expect it to change quite so much. Also for some reason it won't let me quote your comment. Might've been better to ignore it until the final commit so it doesn't

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-09-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 closed this revision. jhuber6 added a comment. Committed in rG9d2378b59150 , forgot to update the commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

2020-09-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 295343. jhuber6 added a comment. Forgot to add one of the test changes from D88594 as it makes this one fail too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88430/new/

[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

2020-09-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 295342. jhuber6 added a comment. Moving the Clang error checks into D88594 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88430/new/ https://reviews.llvm.org/D88430 Files:

[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

2020-09-30 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG90eaedda9b8e: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D88430?vs=295343=295353#toc Repository:

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-09-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: jdoerfert. jhuber6 added projects: OpenMP, clang. Herald added subscribers: cfe-commits, guansong, yaxunl. jhuber6 requested review of this revision. Herald added a subscriber: sstefan1. This patch adds an error to Clang that detects if

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D87946#2283049 , @jdoerfert wrote: > I guess you can try to use `sed` to update the tests. That's what I did for all the clang tests, they all pass as far as I know and I can use the built clang to correctly build offloaded

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. WIP for adding ident_t support to libomptarget. Still breaks some tests, just wanted to get a start. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/ https://reviews.llvm.org/D87946

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: jdoerfert. jhuber6 added a project: OpenMP. Herald added subscribers: llvm-commits, openmp-commits, cfe-commits, jfb, guansong, yaxunl. Herald added projects: clang, LLVM. jhuber6 requested review of this revision. Herald added a

[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

2020-09-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. This currently fails some Clang tests because of an error with how `size_t` is handled by Clang versus OMPKinds.def. The compiler will crash when generating code for a 32 bit device on a 64 bit host because Clang uses the `size_t` from the host while OMPKinds.def uses

[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

2020-09-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: jdoerfert. jhuber6 added projects: OpenMP, LLVM, clang. Herald added subscribers: llvm-commits, cfe-commits, guansong, yaxunl. jhuber6 requested review of this revision. Herald added a subscriber: sstefan1. Replace the OpenMP Runtime

[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

2020-09-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.h:38 + /// An OpenMP-IR-Builder instance. + llvm::OpenMPIRBuilder OMPBuilder; + sstefan1 wrote: > There's already an instance of `OpenMPIRBuilder` in `CGOpenMPRuntime`. > > Maybe

[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

2020-09-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 294798. jhuber6 added a comment. Herald added a subscriber: aaron.ballman. Reusing OMPBuilder from CGOpenMPRuntime. Altered the failing test case. This case failed when compiling for a 32 bit device on a 64 bit host. This case should be considered an error

[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

2020-09-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 294819. jhuber6 added a comment. Removed now unused function for generating convergent runtime functions. Updated Clang to print an error message if the user attempts to specify incompatible architectures due to a difference in pointer sizes. Repository:

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 295949. jhuber6 added a comment. Herald added subscribers: llvm-commits, delcypher. Herald added a project: LLVM. Adding an extra substitution in lit to solve the problem of automatically populating the test files with incompatible architectures. CHANGES

[PATCH] D88594: [OpenMP] Add Error Handling for Conflicting Pointer Sizes for Target Offload

2020-10-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 reopened this revision. jhuber6 added a comment. This revision is now accepted and ready to land. Reopening for now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88594/new/ https://reviews.llvm.org/D88594 ___ cfe-commits mailing

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { jhuber6

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { jdoerfert

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { jdoerfert

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) {

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { jdoerfert

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D80222#2060420 , @jdoerfert wrote: > Take a look at D80735 , it works fine for me > locally. Is that what you did? What problems do you observe now? That's pretty much what I did. If I kept

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: openmp/runtime/test/tasking/kmp_taskloop.c:100 th_counter[i] = 0; -#pragma omp parallel num_threads(N) +#pragma omp parallel // num_threads(N) { jhuber6

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added a comment. Yes, this passed all the tests on my machine at least. Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:124 + return {FnTy, Fn}; +} } jdoerfert wrote: > Are you sure we need to

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D80222#2061810 , @jdoerfert wrote: > LGTM. Thanks for taking this one, it was more complex than I thought but it > is a really nice step in the right direction. I'll commit it for you soon if > you don't have access yet. Feel

[PATCH] D80735: [OpenMP][NFC] Reuse `llvm::omp::types::IdentPtr` in clang

2020-05-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:376 + /// generation. + llvm::OpenMPIRBuilder InternalOMPBuilder; Should D80222 be changed to use this instead and remove the static methods? Repository: rG LLVM Github

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-30 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D80222#2065141 , @jdoerfert wrote: > Initialize the internal OpenMPIRbuilder (see my patch). Isn't it initialized on line 1063 in `CGOpenMPRuntime.cpp`? There weren't any conflicts listed there when I merged your patch so it

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 3 inline comments as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:250 +__OMP_SIZE_TYPE(SizeTy) +#undef __OMP_SIZE_TYPE + jdoerfert wrote: > Why the indirection via `__OMP_SIZE_TYPE`? Wouldn't

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 2 inline comments as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:245 +__OMP_PTR_TYPE(Int8PtrPtr, Int8Ptr) +__OMP_PTR_TYPE(Int8PtrPtrPtr, Int8PtrPtr) + I added these types as @fghanim suggested.

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:483 +__OMP_RTL(__kmpc_push_num_teams, false, /* Void? */ Int32, IdentPtr, Int32, + Int32, Int32) For this one there's

[PATCH] D89904: [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts

2020-10-21 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcd4a4ae97a7c: [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89904/new/

[PATCH] D89802: [OpenMP] Add Passing in Original Declaration Names To Mapper API

2020-10-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Initial version. This fails a few tests and needs additional test cases for the additional functionality as well as support inside the runtime library. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89802/new/

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-10-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 301167. jhuber6 added a comment. Updating after D90172 and D89802 landed. I don't see it failing the tests anymore but I'll look into it more. I should probably make a test for the source

[PATCH] D89904: [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts

2020-10-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, daltenty. Herald added subscribers: cfe-commits, guansong, yaxunl. Herald added a project: clang. jhuber6 requested review of this revision. Herald added a subscriber: sstefan1. The changes made in D88594

[PATCH] D89904: [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts

2020-10-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 299767. jhuber6 added a comment. Changing to just check if the target triple is of four known 64-bit architectures. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89904/new/ https://reviews.llvm.org/D89904

[PATCH] D80735: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang

2020-06-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Here's one of the stack traces. Calling `InternalOMPBuilder.initialize()` is what triggers it to start failing, which is confusing because all that function does is initialize the named types from OMPConstants, which should be working or else the old solution wouldn't

[PATCH] D80735: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang

2020-06-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. The failure message is pretty much always this assertion as far as I can tell clang-11: /home/jhuber/Documents/llvm-project/llvm/lib/IR/Instructions.cpp:439: void llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef, llvm::ArrayRef >, const

[PATCH] D80735: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang

2020-06-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I'm just investigating migrating D80222 away from the static methods. When I try to just add an OpenMPIRBuilder type and initialize it I get failures on the tests. I'm just adding in the module as you have `CGOpenMPRuntime.h`

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-06-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 270239. jhuber6 added a comment. Herald added subscribers: cfe-commits, aaron.ballman. Herald added a project: clang. Adding parameter and return attributes for pointers. There are some arguments I wasn't sure how they should be classified, like if every

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 278905. jhuber6 added a comment. Removed usage of alignment and deference attributes and changed several functions to use barrier attributes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81031/new/

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-17 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG09fe0c5ab9ca: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D81031?vs=278905=278908#toc Repository:

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 278949. jhuber6 added a comment. Fixing errors caused by unused attribute sets. Adding missing attributes to barrier_codegen.cpp. Should I go ahead and commit this considering the previous was temporarily reverted? Or should I just wait a bit to see if it

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D81031#2159796 , @leonardchan wrote: > In D81031#2159646 , @sstefan1 wrote: > > > Just in case you haven't seen already, > > `clang/test/OpenMP/barrier_codegen.cpp` needs to be updated

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D81031#2159943 , @jdoerfert wrote: > In D81031#2159895 , @jhuber6 wrote: > > > Fixing errors caused by unused attribute sets. Adding missing attributes to > > barrier_codegen.cpp. > > >

[PATCH] D94123: [NVPTX] Fix debugging information being added to NVPTX target if remarks are enabled

2021-01-06 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1ca5e68aa07e: [NVPTX] Fix debugging information being added to NVPTX target if remarks are… (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D91370: [OPENMP]Fix PR48076: Check map types array before accessing its front.

2020-11-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. This stops it from crashing Clang, but I'm not sure if it's fixing the underlying problem. When I compile and run this program it crashes in libomptarget. If you get rid of the `float f[50]` in the struct it works as expected. `$ clang++ -fopenmp

[PATCH] D91370: [OPENMP]Fix PR48076: Check map types array before accessing its front.

2020-11-12 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 then. Any clue what the cause of the other problem is? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91370/new/

[PATCH] D91370: [OPENMP]Fix PR48076: Check map types array before accessing its front.

2020-11-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D91370#2392313 , @ABataev wrote: > In D91370#2392310 , @jhuber6 wrote: > >> In D91370#2392267 , @ABataev wrote: >> >>> In D91370#2392171

[PATCH] D91370: [OPENMP]Fix PR48076: Check map types array before accessing its front.

2020-11-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D91370#2392616 , @ABataev wrote: > Could you try this patch: > > diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp > b/clang/lib/CodeGen/CGOpenMPRuntime.cpp > index ce8846140d4..854b7f3e830 100644 > ---

[PATCH] D91370: [OPENMP]Fix PR48076: Check map types array before accessing its front.

2020-11-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D91370#2392319 , @ABataev wrote: > From libomptarget. It must be different. Could you copy it here? Yeah, I think there's some extra information looking at it again. Target CUDA RTL --> Start initializing CUDA

[PATCH] D91370: [OPENMP]Fix PR48076: Check map types array before accessing its front.

2020-11-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D91370#2392616 , @ABataev wrote: > Could you try this patch: > > diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp > b/clang/lib/CodeGen/CGOpenMPRuntime.cpp > index ce8846140d4..854b7f3e830 100644 > ---

[PATCH] D91370: [OPENMP]Fix PR48076: Check map types array before accessing its front.

2020-11-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D91370#2392267 , @ABataev wrote: > In D91370#2392171 , @jhuber6 wrote: > >> LGTM then. >> >> Any clue what the cause of the other problem is? > > Could you try your test with the patch

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-11-19 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 rGda8bec47ab8c: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging (authored by jhuber6). Changed prior to commit:

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-11-18 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 306210. jhuber6 added a comment. Rebasing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/ https://reviews.llvm.org/D87946 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D91552: [OPENMP]Fix PR48076: mapping of data member pointer.

2020-11-16 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 on my machine and passes the unit tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91552/new/

  1   2   3   4   5   6   7   8   9   10   >