Page MenuHomePhabricator

jhuber6 (Joseph Huber)
User

Projects

User does not belong to any projects.

User Details

User Since
May 4 2020, 11:17 AM (8 w, 5 d)

Recent Activity

Fri, Jun 19

jhuber6 added inline comments to D82193: [OpenMPOpt] ICV macro definitions.
Fri, Jun 19, 8:37 AM · Restricted Project

Thu, Jun 11

jhuber6 updated the diff for D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def.

Adding parameter and return attributes for pointers. There are some arguments I wasn't sure how they should be classified, like if every argument should be NoCapture because the lifetime of the memory isn't visible to the caller. For returned void pointers I assumed that they were aligned by eight in cases I found that the return value was a pointer to an OpenMP Runtime struct, otherwise I set it to one. I might need to double check some of the attributes to make sure they make sense.

Thu, Jun 11, 2:53 PM · Restricted Project, Restricted Project, Restricted Project

Wed, Jun 10

jhuber6 updated the diff for D81036: [OpenMP] Begin Adding Analysis Remarks for OpenMP Best Practises..

Small changes, added check for if remarks were enabled. Added calculation of loop trip count given an __kmpc_for_static_init call. Waiting on ICV tracking support to associate correct parallel regions before moving forward.

Wed, Jun 10, 12:13 PM · Restricted Project, Restricted Project

Mon, Jun 8

jhuber6 added inline comments to D81036: [OpenMP] Begin Adding Analysis Remarks for OpenMP Best Practises..
Mon, Jun 8, 8:28 PM · Restricted Project, Restricted Project
jhuber6 added inline comments to D81036: [OpenMP] Begin Adding Analysis Remarks for OpenMP Best Practises..
Mon, Jun 8, 7:55 PM · Restricted Project, Restricted Project
jhuber6 added inline comments to D81036: [OpenMP] Begin Adding Analysis Remarks for OpenMP Best Practises..
Mon, Jun 8, 4:06 PM · Restricted Project, Restricted Project
jhuber6 updated the diff for D81036: [OpenMP] Begin Adding Analysis Remarks for OpenMP Best Practises..

Small changes and adding support for checking use of shared for variables that should be pass-by-value.

Mon, Jun 8, 4:06 PM · Restricted Project, Restricted Project

Jun 4 2020

jhuber6 added inline comments to D81036: [OpenMP] Begin Adding Analysis Remarks for OpenMP Best Practises..
Jun 4 2020, 10:27 AM · Restricted Project, Restricted Project
jhuber6 added a comment to D80735: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang.

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 work. Unless the compiler is just straight up optimizing out the Irbuilder without the initialize call which I find highly unlikely.

Jun 4 2020, 9:20 AM · Restricted Project, Restricted Project
jhuber6 added a comment to D80735: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang.

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::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, const llvm::Twine&): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.
Jun 4 2020, 7:38 AM · Restricted Project, Restricted Project

Jun 3 2020

jhuber6 added a comment to D80735: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang.

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

llvm::OpenMPIRBuilder InternalOMPBuilder;

CGOpenMPRuntime.cpp

CGOpenMPRuntime::CGOpenMPRuntime(CodeGenModule &CGM, StringRef FirstSeparator,
                                 StringRef Separator)
    : CGM(CGM), FirstSeparator(FirstSeparator), Separator(Separator),
      InternalOMPBuilder(CGM.getModule()), OffloadEntriesInfoManager(CGM) {
  InternalOMPBuilder.initialize();
Jun 3 2020, 12:05 PM · Restricted Project, Restricted Project
jhuber6 added a comment to D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def.

What should we be doing about the argument and return attributes?

Jun 3 2020, 9:53 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 updated the diff for D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def.

Small changes

Jun 3 2020, 9:53 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 updated the diff for D81036: [OpenMP] Begin Adding Analysis Remarks for OpenMP Best Practises..

Making minor adjustments.

Jun 3 2020, 7:05 AM · Restricted Project, Restricted Project

Jun 2 2020

jhuber6 added inline comments to D81036: [OpenMP] Begin Adding Analysis Remarks for OpenMP Best Practises..
Jun 2 2020, 6:40 PM · Restricted Project, Restricted Project
jhuber6 added inline comments to D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def.
Jun 2 2020, 3:23 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 created D81036: [OpenMP] Begin Adding Analysis Remarks for OpenMP Best Practises..
Jun 2 2020, 2:50 PM · Restricted Project, Restricted Project
jhuber6 created D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def.
Jun 2 2020, 1:42 PM · Restricted Project, Restricted Project, Restricted Project

Jun 1 2020

jhuber6 committed rG1a4fb2edcb90: [OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.def (authored by jhuber6).
[OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.def
Jun 1 2020, 1:34 PM
jhuber6 closed D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
Jun 1 2020, 1:34 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 updated the diff for D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

Reverting changed from D80735 and merging with origin/master. Adding an OpenMPIRBuilder object and removing the static methods caused a lot of the tests to fail. I think I'm going to try to get this version done and we can modify it later.

Jun 1 2020, 10:12 AM · Restricted Project, Restricted Project, Restricted Project

May 30 2020

jhuber6 added a comment to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

Initialize the internal OpenMPIRbuilder (see my patch).

May 30 2020, 4:58 PM · Restricted Project, Restricted Project, Restricted Project

May 29 2020

jhuber6 updated the diff for D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

Merging patch with origin and D80735. This now fails a lot of the tests after the merge. I had a previous branch that was merging it with origin after some new functions were added to CGOpenMPRuntime.cpp that only failed libomp/declare_mapper_api.cpp with a segfault. I'll keep looking into it.

May 29 2020, 4:57 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 added inline comments to D80735: [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang.
May 29 2020, 1:40 PM · Restricted Project, Restricted Project

May 28 2020

jhuber6 added a comment to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

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 free to get access though.

May 28 2020, 5:38 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 updated the diff for D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

This passed all tests on my machine. I changed the bitcast to always try to cast the types. Let me know if you think there's anything else I should change because I think this might be good to go.

May 28 2020, 11:33 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 added a comment to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

Yes, this passed all the tests on my machine at least.

May 28 2020, 10:23 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 updated the diff for D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

Changed getOrCreateRuntimeFunction to return a FunctionCallee instead of a Function*. Added a helper function inside of OpenMPIRBuilder to get the Function*. Added conditional bitcast to change the types if they do not match. This was done inside of CGM.createRuntimeFunction if it found an existing declaration and the types didn't match. Maybe be able to change this back to just return a Function*

May 28 2020, 9:50 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 added a comment to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

Take a look at D80735, it works fine for me locally. Is that what you did? What problems do you observe now?

May 28 2020, 9:50 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 28 2020, 7:34 AM · Restricted Project, Restricted Project, Restricted Project

May 27 2020

jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 27 2020, 8:44 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 27 2020, 3:16 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 27 2020, 1:36 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 27 2020, 11:56 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 updated the diff for D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

Making suggested changes.

May 27 2020, 11:56 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 27 2020, 9:43 AM · Restricted Project, Restricted Project, Restricted Project

May 26 2020

jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 26 2020, 2:45 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 26 2020, 2:11 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 updated the diff for D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

Fixed the issue with the libomp tests and now pass every test. I combined this patch with D79739 so that patch is now obsolete.

May 26 2020, 2:10 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 updated the diff for D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

This passes all checks except the libomp ones. Those still seg-fault, I'm not entirely sure why. Cuda failure is again because I don't have it configured on my machine.

May 26 2020, 9:44 AM · Restricted Project, Restricted Project, Restricted Project

May 22 2020

jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 22 2020, 6:56 AM · Restricted Project, Restricted Project, Restricted Project

May 21 2020

jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 21 2020, 11:53 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 updated the diff for D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

Making suggested changes. I added a quick implementation of size_t by getting the target triple data from the Module we have access to in the initializeTypes function, I'm not sure if this works in all situations. After changing the implementation some of the tests are invalidated and will need to be changed. push_num_teams was changed to void so now the tests that assign a register to the return value will fail. Additionally this applies the function attributes so some of the tests will check for not having function attributes. There are still tests that cause it to segfault, I think it might be related to OpenMP 5.0 because it's listed in the arguments. I just wanted to get this up for some feedback before rewriting the tests. Here's the tests that failed, the ones involving teams were mostly related to changing push_num_teams to void, the others are seg faults.

May 21 2020, 11:53 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 added inline comments to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 21 2020, 8:36 AM · Restricted Project, Restricted Project, Restricted Project

May 20 2020

jhuber6 added a comment to D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

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, libomp used to pass until I changed it to us getOrCreateRuntimeFunction I think.

Clang :: Driver/cuda-simple.cu
Clang :: OpenMP/barrier_codegen.cpp
Clang :: OpenMP/distribute_parallel_for_reduction_codegen.cpp
Clang :: OpenMP/distribute_parallel_for_reduction_task_codegen.cpp
Clang :: OpenMP/for_reduction_task_codegen.cpp
Clang :: OpenMP/nvptx_target_parallel_reduction_codegen.cpp
Clang :: OpenMP/nvptx_teams_reduction_codegen.cpp
Clang :: OpenMP/openmp_win_codegen.cpp
Clang :: OpenMP/parallel_firstprivate_codegen.cpp
Clang :: OpenMP/parallel_for_reduction_task_codegen.cpp
Clang :: OpenMP/parallel_master_reduction_task_codegen.cpp
Clang :: OpenMP/parallel_reduction_task_codegen.cpp
Clang :: OpenMP/parallel_sections_reduction_task_codegen.cpp
Clang :: OpenMP/sections_reduction_task_codegen.cpp
Clang :: OpenMP/target_depend_codegen.cpp
Clang :: OpenMP/target_enter_data_depend_codegen.cpp
Clang :: OpenMP/target_exit_data_depend_codegen.cpp
Clang :: OpenMP/target_parallel_depend_codegen.cpp
Clang :: OpenMP/target_parallel_for_depend_codegen.cpp
Clang :: OpenMP/target_parallel_for_reduction_task_codegen.cpp
Clang :: OpenMP/target_parallel_for_simd_depend_codegen.cpp
Clang :: OpenMP/target_parallel_reduction_task_codegen.cpp
Clang :: OpenMP/target_simd_depend_codegen.cpp
Clang :: OpenMP/target_teams_depend_codegen.cpp
Clang :: OpenMP/target_teams_distribute_depend_codegen.cpp
Clang :: OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp
Clang :: OpenMP/target_teams_distribute_parallel_for_reduction_codegen.cpp
Clang :: OpenMP/target_teams_distribute_parallel_for_reduction_task_codegen.cpp
Clang :: OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp
Clang :: OpenMP/target_teams_distribute_parallel_for_simd_reduction_codegen.cpp
Clang :: OpenMP/target_teams_distribute_reduction_codegen.cpp
Clang :: OpenMP/target_teams_distribute_simd_depend_codegen.cpp
Clang :: OpenMP/target_teams_distribute_simd_reduction_codegen.cpp
Clang :: OpenMP/target_teams_map_codegen.cpp
Clang :: OpenMP/target_update_depend_codegen.cpp
Clang :: OpenMP/teams_distribute_parallel_for_reduction_codegen.cpp
Clang :: OpenMP/teams_distribute_parallel_for_reduction_task_codegen.cpp
Clang :: OpenMP/teams_distribute_parallel_for_simd_reduction_codegen.cpp
Clang :: OpenMP/teams_distribute_reduction_codegen.cpp
Clang :: OpenMP/teams_distribute_simd_reduction_codegen.cpp
libomp :: tasking/kmp_taskloop.c
libomp :: worksharing/for/kmp_doacross_check.c
May 20 2020, 6:15 PM · Restricted Project, Restricted Project, Restricted Project
jhuber6 updated the diff for D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.

Changed CGOpenMPRuntime to use the getOrCreateRuntimeFunction method in OpenMPIRBuilder. Also changed the type signature for kmpc_critical_with_hint to Int32Ty.

May 20 2020, 11:27 AM · Restricted Project, Restricted Project, Restricted Project

May 19 2020

jhuber6 updated the summary of D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 19 2020, 10:55 AM · Restricted Project, Restricted Project, Restricted Project
jhuber6 created D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def.
May 19 2020, 10:55 AM · Restricted Project, Restricted Project, Restricted Project

May 13 2020

jhuber6 updated the diff for D79739: Adding Extra Runtime Functions to OMPKinds.def.

Added missing VoitPtr.

May 13 2020, 8:38 AM · Restricted Project, Restricted Project

May 12 2020

jhuber6 added inline comments to D79739: Adding Extra Runtime Functions to OMPKinds.def.
May 12 2020, 3:06 PM · Restricted Project, Restricted Project
jhuber6 updated the diff for D79739: Adding Extra Runtime Functions to OMPKinds.def.

I just added a temporary type that sets it to Int64 so it will compile, then it can be removed once there's an external type. Does that work?

May 12 2020, 3:04 PM · Restricted Project, Restricted Project
jhuber6 updated the diff for D79739: Adding Extra Runtime Functions to OMPKinds.def.

Adding missing runtimes and a void pointer type. Replaced uses of size_t with SizeTy instead of Int64, SizeTy isn't defined yet so it won't build.

May 12 2020, 12:21 PM · Restricted Project, Restricted Project
jhuber6 added a comment to D79739: Adding Extra Runtime Functions to OMPKinds.def.

So should I just add his SizeTy wherever the function uses size_t? I could also do a define of VoidPtr and Int8Ptr to make it more obvious.

May 12 2020, 9:39 AM · Restricted Project, Restricted Project
jhuber6 added inline comments to D79739: Adding Extra Runtime Functions to OMPKinds.def.
May 12 2020, 7:29 AM · Restricted Project, Restricted Project
jhuber6 added a comment to D79739: Adding Extra Runtime Functions to OMPKinds.def.

Should I start adding the target offload runtime functions?

May 12 2020, 6:57 AM · Restricted Project, Restricted Project

May 11 2020

jhuber6 updated the diff for D79739: Adding Extra Runtime Functions to OMPKinds.def.

Adding nounwind attributes.

May 11 2020, 7:27 PM · Restricted Project, Restricted Project
jhuber6 added inline comments to D79739: Adding Extra Runtime Functions to OMPKinds.def.
May 11 2020, 7:27 PM · Restricted Project, Restricted Project
jhuber6 updated the diff for D79359: OpenMPOpt Remarks Support.

Updating files closer to origin.

May 11 2020, 5:18 PM · Restricted Project, Restricted Project
jhuber6 added a comment to D79739: Adding Extra Runtime Functions to OMPKinds.def.

I got most of them by getting the LLVM IR for the test files in openmp/runtime/test and took the unique calls, then filled in the gaps for some variants and others I knew of. There may be a few that Clang doesn't generate, I think kmpc_begin() is always implicit. I wasn't sure if I could declare them all as nounwind since there were some other kmpc* calls in the add_attributes.ll that didn't show any attributes so I was playing on the safe side. I could add them all as nounwind if it's safe.

May 11 2020, 1:28 PM · Restricted Project, Restricted Project
jhuber6 created D79739: Adding Extra Runtime Functions to OMPKinds.def.
May 11 2020, 12:56 PM · Restricted Project, Restricted Project

May 7 2020

jhuber6 added a comment to D79359: OpenMPOpt Remarks Support.

Just realized the master branch changed the attributor flags for the test file. Should I add a diff that's more up-to-date?

May 7 2020, 4:19 PM · Restricted Project, Restricted Project
jhuber6 updated the diff for D79359: OpenMPOpt Remarks Support.

Adding a remark and test for parallel region deletion. Added a NV tag for the runtime function deduplicated / moved.

May 7 2020, 11:57 AM · Restricted Project, Restricted Project

May 5 2020

jhuber6 updated the diff for D79359: OpenMPOpt Remarks Support.

Making suggested changes.

May 5 2020, 2:36 PM · Restricted Project, Restricted Project
jhuber6 added inline comments to D79359: OpenMPOpt Remarks Support.
May 5 2020, 9:41 AM · Restricted Project, Restricted Project
jhuber6 updated the diff for D79359: OpenMPOpt Remarks Support.

I added a DenseMap to cache the Functions for the legacy PM's getter function. Let me know if I should've used a different data structure for this.

May 5 2020, 9:41 AM · Restricted Project, Restricted Project

May 4 2020

jhuber6 added inline comments to D79359: OpenMPOpt Remarks Support.
May 4 2020, 8:59 PM · Restricted Project, Restricted Project
jhuber6 updated the diff for D79359: OpenMPOpt Remarks Support.

Changed OREGetter to return the ORE by reference rather than with a unique_ptr.

May 4 2020, 7:23 PM · Restricted Project, Restricted Project
jhuber6 added inline comments to D79359: OpenMPOpt Remarks Support.
May 4 2020, 7:22 PM · Restricted Project, Restricted Project
jhuber6 created D79359: OpenMPOpt Remarks Support.
May 4 2020, 12:53 PM · Restricted Project, Restricted Project