Page MenuHomePhabricator
Feed Advanced Search

Sat, Sep 28

Hahnfeld set the repository for D68166: [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries to rG LLVM Github Monorepo.
Sat, Sep 28, 3:08 AM · Restricted Project

Sep 11 2019

Hahnfeld added a comment to D66107: [libFuzzer] Make -merge=1 to reuse coverage information from the control file..

I think the bots are also green, so it might be just related to how I build Clang (with libc++, for example). I'm half way through building ToT with GCC, that should give insight whether it's related to my system or my configuration.

Actually, some ARM bots got broken, so I've uploaded a fix: https://reviews.llvm.org/D67458

Just curious: So the number of new features and coverage edges does not need to be the same? I also have "15 new freatures" for CHECK2.

Yes, features include coverage edges + additional signal (e.g. value profiling), that's why the number is different and why number of features can differ between platforms.

Sep 11 2019, 12:50 PM · Restricted Project, Restricted Project
Hahnfeld added a comment to D66107: [libFuzzer] Make -merge=1 to reuse coverage information from the control file..

Hm, doesn't fail for me, but I guess the feature detection might be platform-dependent to some extent, so I'm fine with replacing the number of the features with a regex. Do you want to upload a change, or should I?

Sep 11 2019, 11:33 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D66107: [libFuzzer] Make -merge=1 to reuse coverage information from the control file..

The new test is failing for me because CHECK1 is not satisfied. Instead the line says MERGE-OUTER: 3 new files with 12 new features added; 11 new coverage edges (instead of 11 new features). I'm currently investigating what's wrong here, let me know if you have an idea.

Sep 11 2019, 11:06 AM · Restricted Project, Restricted Project
Hahnfeld accepted D67413: [Clang][Bundler] Replace std::vector by SmallVector [NFC].

LGTM

Sep 11 2019, 8:02 AM · Restricted Project
Hahnfeld accepted D67416: [Clang][Bundler] Fix for a potential memory leak [NFC].

LG iff the following is correct: The leak is when dyn_cast can't cast and returns null, right? If so, please add into the summary (and do so for future revisions, it will speed up review).

Sep 11 2019, 8:02 AM · Restricted Project

Sep 10 2019

Hahnfeld added a comment to D45890: [OMPT] Add implementation and tests of Archer tool.

The code itself looks good to me (it should probably be clang-formated). If others have comments, please raise them now.

Sep 10 2019, 10:53 AM

Sep 8 2019

Hahnfeld committed rG307daa71a8f0: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime (authored by Hahnfeld).
[ASan] Only run dlopen-mixed-c-cxx.c with static runtime
Sep 8 2019, 9:11 AM
Hahnfeld committed rL371336: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime.
[ASan] Only run dlopen-mixed-c-cxx.c with static runtime
Sep 8 2019, 9:11 AM
Hahnfeld closed D67298: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime.
Sep 8 2019, 9:11 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D67298: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime.

Successfully tested on my box! I'd just use

diff
 - UNSUPPORTED: asan-dynamic-runtime
 +REQUIRES: x86_64-target-arch && !android && !asan-dynamic-runtime

if that works on your side too.

Sep 8 2019, 4:37 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D67319: Fix dlopen-mixed-c-cxx test case when libstdc++ is not available.

For the record, I don't think this would have worked: I do have libstdc++ available on my system (I just choose SANITIZER_CXX_ABI=libcxxabi for other reasons) and passing -stdlib=libstdc++ when building the test doesn't help as I've already said in D67298. Moreover, there's nothing in the test that requires libstdc++, it just happens to pass due to many chained implications, and restricting a test without understanding the root cause is probably no good idea.

Sep 8 2019, 4:34 AM · Restricted Project, Restricted Project

Sep 7 2019

Hahnfeld updated the summary of D67298: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime.
Sep 7 2019, 6:24 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D67298: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime.

And that's what I don't understand

My fault for not being clear enough. Let me elaborate the original faulty use case:

You've got an application written in C, compiled with asan, that dlopens a library written in C++, linked to libstdc++
When the application starts, asan installs a few handler based on the loaded symbols. It used to install a handler that points to itself for __cxa_throw because the symbol is not present in the binary.

Sep 7 2019, 6:06 AM · Restricted Project, Restricted Project
Hahnfeld updated the diff for D67298: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime.

I think I just figured out that the original problem is about static runtime, so it doesn't make sense to run the test with dynamic asan.

Sep 7 2019, 3:36 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D67298: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime.

Mmmmh the whole point of the test is to test how asan behaves when meeting a symbol like __cxa_throw in a dlopened library when the calling compilation unit is not linked against libstdc++. Previous behavior was a segfault, we should now get a reasonable error.

Sep 7 2019, 2:58 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D67298: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime.

Mmmmh the whole point of the test is to test how asan behaves when meeting a symbol like __cxa_throw in a dlopened library when the calling compilation unit is not linked against libstdc++. Previous behavior was a segfault, we should now get a reasonable error. By defining __cxa_throw in the c file, you remove the origin of the bug, so sure it works, but it no longer tests the faulty situation. Maybe there's a symbol caught by asan and defined in both libcxx and libstdc++?

Sep 7 2019, 1:08 AM · Restricted Project, Restricted Project

Sep 6 2019

Hahnfeld added a comment to D63877: Avoid infinite loop with asan interception.

I've posted a change that makes the test work for me in D67298, please take a look.

Sep 6 2019, 12:25 PM · Restricted Project, Restricted Project
Hahnfeld created D67298: [ASan] Only run dlopen-mixed-c-cxx.c with static runtime.
Sep 6 2019, 12:24 PM · Restricted Project, Restricted Project

Sep 4 2019

Hahnfeld added inline comments to D67031: [Clang][Bundler] Error reporting improvements.
Sep 4 2019, 12:34 PM · Restricted Project
Hahnfeld added a comment to D67031: [Clang][Bundler] Error reporting improvements.

Also, there should be a summary of the changes in here.

Sep 4 2019, 11:29 AM · Restricted Project
Hahnfeld added inline comments to D67031: [Clang][Bundler] Error reporting improvements.
Sep 4 2019, 11:13 AM · Restricted Project
Hahnfeld committed rG673e5476a817: [OpenMP] Change initialization of __kmp_global (authored by Hahnfeld).
[OpenMP] Change initialization of __kmp_global
Sep 4 2019, 10:53 AM
Hahnfeld committed rL370943: [OpenMP] Change initialization of __kmp_global.
[OpenMP] Change initialization of __kmp_global
Sep 4 2019, 10:47 AM
Hahnfeld closed D66292: [OpenMP] Change initialization of __kmp_global.
Sep 4 2019, 10:46 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D63877: Avoid infinite loop with asan interception.

Is that summary correct?

It is :-)

Sep 4 2019, 12:30 AM · Restricted Project, Restricted Project

Sep 3 2019

Hahnfeld added a comment to D63877: Avoid infinite loop with asan interception.

@Hahnfeld : I understand your concern. However this test case is meant to test handling of stdlib exceptions, so it doesn't look strange to disable it if stdlib is not used, right? [...]

Sep 3 2019, 1:34 PM · Restricted Project, Restricted Project

Sep 2 2019

Hahnfeld committed rL370683: Request commit access for hahnfeld.
Request commit access for hahnfeld
Sep 2 2019, 1:17 PM

Aug 31 2019

Hahnfeld added a comment to D67031: [Clang][Bundler] Error reporting improvements.

This changes error messages, so I'd say it's not NFC.

Aug 31 2019, 7:57 AM · Restricted Project

Aug 30 2019

Hahnfeld added a comment to D63877: Avoid infinite loop with asan interception.

@Hahnfeld : I failed to reproduce the issue locally, but I assume the following patch may solve your issue:

--- a/compiler-rt/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c
+++ b/compiler-rt/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c
@@ -5,7 +5,7 @@
 //
 // CHECK: {{.*}}AddressSanitizer: failed to intercept '__cxa_{{.*}}throw{{.*}}'
 //
-// REQUIRES: x86_64-target-arch && !android
+// REQUIRES: x86_64-target-arch && !android && !cxxabi

can you give it a try?

Aug 30 2019, 8:46 AM · Restricted Project, Restricted Project

Aug 15 2019

Hahnfeld accepted D65819: [Driver][Bundler] Improve bundling of object files..

LG, thanks for the changes.

Aug 15 2019, 9:53 AM · Restricted Project, Restricted Project
Hahnfeld accepted D66296: [BUNDLER]Improve the test, NFC..

LG

Aug 15 2019, 8:30 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65819: [Driver][Bundler] Improve bundling of object files..

Please submit the test changes unrelated to the code changes in a separate patch!

Aug 15 2019, 8:01 AM · Restricted Project, Restricted Project
Hahnfeld added inline comments to D66292: [OpenMP] Change initialization of __kmp_global.
Aug 15 2019, 7:16 AM · Restricted Project, Restricted Project
Hahnfeld created D66292: [OpenMP] Change initialization of __kmp_global.
Aug 15 2019, 7:13 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65868: [OpenMP] Remove workaround for CMPXCHG.

Unfortunately, the Windows atomic code will not compile with this change. See in kmp_atomic.h the different atomic types for Windows. The complaints are regarding assignment operations for the complex types.

../../src/kmp_atomic.cpp(1325): error: class "__kmp_cmplx32_t" has no suitable assignment operator
  ATOMIC_CMPXCHG(cmplx4, add, kmp_cmplx32, 64, +, 8c, 7,
  ^
Aug 15 2019, 7:07 AM · Restricted Project
Hahnfeld requested changes to D65819: [Driver][Bundler] Improve bundling of object files..

The code changes look good to me, but the test doesn't pass on x86. We've faced the same problem when clang-offload-bundler was initially committed and the current testing is the best we were able to do.

Aug 15 2019, 6:54 AM · Restricted Project, Restricted Project
Hahnfeld removed a reviewer for D55892: [OpenMP] 'close' map-type-modifier code generation: Hahnfeld.

Can we close this after D65341 landed?

Aug 15 2019, 6:30 AM · Restricted Project, Restricted Project
Hahnfeld committed rGd2ae0c4f443c: [OpenMP] Enable warning about "implicit fallthrough" (authored by Hahnfeld).
[OpenMP] Enable warning about "implicit fallthrough"
Aug 15 2019, 6:28 AM
Hahnfeld committed rG4d77e50e6ede: [OpenMP] Remove 'unnecessary parentheses' (authored by Hahnfeld).
[OpenMP] Remove 'unnecessary parentheses'
Aug 15 2019, 6:27 AM
Hahnfeld committed rGfb72a03f85dc: [OMPT] Resolve warnings because of ints in if conditions (authored by Hahnfeld).
[OMPT] Resolve warnings because of ints in if conditions
Aug 15 2019, 6:26 AM
Hahnfeld committed rL369003: [OpenMP] Enable warning about "implicit fallthrough".
[OpenMP] Enable warning about "implicit fallthrough"
Aug 15 2019, 6:26 AM
Hahnfeld closed D65871: [OpenMP] Enable warning about "implicit fallthrough".
Aug 15 2019, 6:26 AM · Restricted Project, Restricted Project
Hahnfeld committed rL369002: [OpenMP] Remove 'unnecessary parentheses'.
[OpenMP] Remove 'unnecessary parentheses'
Aug 15 2019, 6:26 AM
Hahnfeld closed D65870: [OpenMP] Remove 'unnecessary parentheses'.
Aug 15 2019, 6:26 AM · Restricted Project, Restricted Project
Hahnfeld committed rL369001: [OMPT] Resolve warnings because of ints in if conditions.
[OMPT] Resolve warnings because of ints in if conditions
Aug 15 2019, 6:26 AM
Hahnfeld closed D65869: [OMPT] Resolve warnings because of ints in if conditions.
Aug 15 2019, 6:25 AM · Restricted Project, Restricted Project
Hahnfeld committed rGdc23c832f4f7: [OpenMP] Turn on -Wall compiler warnings by default (authored by Hahnfeld).
[OpenMP] Turn on -Wall compiler warnings by default
Aug 15 2019, 6:12 AM
Hahnfeld committed rL368999: [OpenMP] Turn on -Wall compiler warnings by default.
[OpenMP] Turn on -Wall compiler warnings by default
Aug 15 2019, 6:12 AM
Hahnfeld closed D65867: [RFC] [OpenMP] Turn on -Wall compiler warnings by default.
Aug 15 2019, 6:12 AM · Restricted Project, Restricted Project

Aug 14 2019

Hahnfeld added a comment to D65819: [Driver][Bundler] Improve bundling of object files..

Okay, so I wasn't happy with the current explanations because I don't like "fixing" an issue without understanding the problem. Here's a small reproducer:

$  cat main.cpp 
#include "test.h"
Aug 14 2019, 2:47 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65836: Factor architecture dependent code out of loop.cu.

Jon, please subscribe to openmp-commits so that commit emails get through immediately. Thanks!

Aug 14 2019, 1:08 AM · Restricted Project, Restricted Project

Aug 13 2019

Hahnfeld added a comment to D65819: [Driver][Bundler] Improve bundling of object files..

Will this patch change the ability to consume a bundled object file without calling the unbundler? Using known ELF tools on the produced object files was an important design decision and IIRC was somewhat important for using build systems that are unaware of the bundled format.

Ping.

Missed this. We still produce correct object files, so all the tools will work with this.

I agree on a technical level that it's still a "correct" object, but not what I was looking for: The host object file will only be in the bundled section, so you cannot examine it without unbundling.

For example, with a small test file and clang -fopenmp -fopenmp-targets=x86_64 -c test.c I saw the following:

$ nm test.o                                       
0000000000000000 t .omp_offloading.requires_reg
0000000000000000 T test
                 U __tgt_register_requires

After applying this patch, the output is empty which might be a problem in certain cases.

Unfortunately, this is the only possible solution I see. There are already 2 reports that bundled objects does not work correctly after unbundling.

Can you please again share what exactly is the problem, with a small example? I saw discussions on openmp-dev, but that project was huge, and above you were quoting a man page and hinted to global constructors.

I don't have a small reproducer, unfortunately, only the big one.
Here is the message from the user:

Hi,
I am revisiting this possible compiler bug in Clang 8.0.0.

In the source code I am developing, there's a global static variable, nest::sli_neuron::recordablesMap_ put in the BSS section and it is expected to be fully initialized by the time nest::sli_neuron::sli_neuron() gets called, however in a gdb session:

(gdb) p nest::sli_neuron::recordablesMap_
Python Exception <type 'exceptions.AttributeError'> 'gdb.Type' object has no attribute 'name':
$1 = {<std::map<Name, double (nest::sli_neuron::*)() const, std::less<Name>, std::allocator<std::pair<Name const, double (nest::sli_neuron::*)() const> > >> = std::map with 0 elements, _vptr$RecordablesMap = 0x0}

this doesn't happen when -fopenmp-targets is _not_ used, is it not trivial to come up a reproducer, thus I am sending a work-in-progress report hoping someone will shed some light on this.

Thanks,
Itaru.

Another one:

Hi,
I am seeing a link error shown below:

`.text.startup' referenced in section `.init_array.0' of /tmp/event_delivery_manager-02f392.o: defined in discarded section `.text.startup[_ZN4nest18DataSecondaryEventIdNS_16GapJunctionEventEE18supported_syn_ids_E]' of /tmp/event_delivery_manager-02f392.o
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)

I am not sure how to tackle this as the part is referenced isn't what I am
working on. I am using the latest trunk Clang 10 at this moment.

Steps to reproduce:

Steps to produce:
$ git clone https://https://github.com/nest/nest-simulator/
$ mkdir /tmp/build/nest-clang-offload/
$ cd /tmp/build/nest-clang-offload/
$ cmake -DCMAKE_TOOLCHAIN_FILE=Platform/JURON_Clang -DCMAKE_INSTALL_PREFIX=/path/to/opt/nest-clang -Dwith-gsl=ON -Dwith-openmp=ON -Dwith-mpi=OFF -Dwith-python=OFF -Dwith-offload=ON /path/to/nest-simulator/
Aug 13 2019, 12:32 PM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65819: [Driver][Bundler] Improve bundling of object files..

Will this patch change the ability to consume a bundled object file without calling the unbundler? Using known ELF tools on the produced object files was an important design decision and IIRC was somewhat important for using build systems that are unaware of the bundled format.

Ping.

Missed this. We still produce correct object files, so all the tools will work with this.

I agree on a technical level that it's still a "correct" object, but not what I was looking for: The host object file will only be in the bundled section, so you cannot examine it without unbundling.

For example, with a small test file and clang -fopenmp -fopenmp-targets=x86_64 -c test.c I saw the following:

$ nm test.o                                       
0000000000000000 t .omp_offloading.requires_reg
0000000000000000 T test
                 U __tgt_register_requires

After applying this patch, the output is empty which might be a problem in certain cases.

Unfortunately, this is the only possible solution I see. There are already 2 reports that bundled objects does not work correctly after unbundling.

Aug 13 2019, 11:52 AM · Restricted Project, Restricted Project
Hahnfeld added inline comments to D65819: [Driver][Bundler] Improve bundling of object files..
Aug 13 2019, 11:41 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65819: [Driver][Bundler] Improve bundling of object files..

Will this patch change the ability to consume a bundled object file without calling the unbundler? Using known ELF tools on the produced object files was an important design decision and IIRC was somewhat important for using build systems that are unaware of the bundled format.

Ping.

Missed this. We still produce correct object files, so all the tools will work with this.

Aug 13 2019, 11:37 AM · Restricted Project, Restricted Project
Hahnfeld updated the diff for D65871: [OpenMP] Enable warning about "implicit fallthrough".

Rebase.

Aug 13 2019, 11:02 AM · Restricted Project, Restricted Project
Hahnfeld updated the diff for D65867: [RFC] [OpenMP] Turn on -Wall compiler warnings by default.

Change check_c_compiler_flag() to check_cxx_compiler_flag().

Aug 13 2019, 11:00 AM · Restricted Project, Restricted Project
Hahnfeld added inline comments to D65867: [RFC] [OpenMP] Turn on -Wall compiler warnings by default.
Aug 13 2019, 9:08 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65819: [Driver][Bundler] Improve bundling of object files..

Will this patch change the ability to consume a bundled object file without calling the unbundler? Using known ELF tools on the produced object files was an important design decision and IIRC was somewhat important for using build systems that are unaware of the bundled format.

Aug 13 2019, 7:02 AM · Restricted Project, Restricted Project

Aug 12 2019

Hahnfeld added inline comments to D65867: [RFC] [OpenMP] Turn on -Wall compiler warnings by default.
Aug 12 2019, 11:55 AM · Restricted Project, Restricted Project

Aug 11 2019

Hahnfeld updated the diff for D65868: [OpenMP] Remove workaround for CMPXCHG.

Remove compiler check for -Wno-uninitialized.

Aug 11 2019, 4:17 AM · Restricted Project
Hahnfeld added inline comments to D65870: [OpenMP] Remove 'unnecessary parentheses'.
Aug 11 2019, 4:09 AM · Restricted Project, Restricted Project
Hahnfeld updated the diff for D65870: [OpenMP] Remove 'unnecessary parentheses'.

Remove another unnecessary cast.

Aug 11 2019, 4:09 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D63877: Avoid infinite loop with asan interception.

ok, it's probably a regex issue for the test, I'll check that.

Aug 11 2019, 2:33 AM · Restricted Project, Restricted Project

Aug 10 2019

Hahnfeld added a comment to D63877: Avoid infinite loop with asan interception.

This test is also failing for me on CentOS 7, Intel x86. Any clues what's wrong here?

Aug 10 2019, 4:38 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D63877: Avoid infinite loop with asan interception.

This test is also failing for me on CentOS 7, Intel x86. Any clues what's wrong here?

Aug 10 2019, 2:56 AM · Restricted Project, Restricted Project

Aug 9 2019

Hahnfeld accepted D65340: [OpenMP][libomptarget] Add support for close map modifier.

LG after addressing the last minor nits (comment + cast + check).

Aug 9 2019, 1:17 PM · Restricted Project, Restricted Project
Hahnfeld requested changes to D65340: [OpenMP][libomptarget] Add support for close map modifier.

Can you please rebase on top of D66019? Sorry, that'll probably give you some conflicts :-/

Aug 9 2019, 12:30 PM · Restricted Project, Restricted Project
Hahnfeld committed rG7a0f2dc5a4c0: [libomptarget] Remove duplicate RTLRequiresFlags per device (authored by Hahnfeld).
[libomptarget] Remove duplicate RTLRequiresFlags per device
Aug 9 2019, 12:22 PM
Hahnfeld committed rL368465: [libomptarget] Remove duplicate RTLRequiresFlags per device.
[libomptarget] Remove duplicate RTLRequiresFlags per device
Aug 9 2019, 12:20 PM
Hahnfeld closed D66019: [libomptarget] Remove duplicate RTLRequiresFlags per device.
Aug 9 2019, 12:20 PM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65340: [OpenMP][libomptarget] Add support for close map modifier.

@Hahnfeld
I would like to clarify something about tgt_register_requires call.

This call is special and in a compiler that supports handling of requires clauses (like unified_shared_memory clause) ( i.e. Clang 9.0 onwards), this function is called before any main function code. Here is a printout with LIBOMPTARGET_DEBUG=1 to realize the difference:

===== WHERE COMPILER PLACES CALL TO __tgt_register_requires() ========
Libomptarget --> Loading RTLs... <<<< THIS IS THE VERY FIRST PRINT FROM THE RUNTIME. The call to __tgt_register_requires is just before that.
Libomptarget --> Loading library 'libomptarget.rtl.ppc64.so'...
Libomptarget --> Successfully loaded library 'libomptarget.rtl.ppc64.so'!
Libomptarget --> Registering RTL libomptarget.rtl.ppc64.so supporting 4 devices!
Libomptarget --> Loading library 'libomptarget.rtl.x86_64.so'...
Libomptarget --> Unable to load library 'libomptarget.rtl.x86_64.so': libomptarget.rtl.x86_64.so: cannot open shared object file: No such file or directory!
Libomptarget --> Loading library 'libomptarget.rtl.cuda.so'...
Target CUDA RTL --> Start initializing CUDA
Libomptarget --> Successfully loaded library 'libomptarget.rtl.cuda.so'!
Libomptarget --> Registering RTL libomptarget.rtl.cuda.so supporting 4 devices!
Libomptarget --> Loading library 'libomptarget.rtl.aarch64.so'...
Libomptarget --> Unable to load library 'libomptarget.rtl.aarch64.so': libomptarget.rtl.aarch64.so: cannot open shared object file: No such file or directory!
Libomptarget --> RTLs loaded!
Libomptarget --> Image 0x0000000010020080 is compatible with RTL libomptarget.rtl.ppc64.so!
Libomptarget --> RTL 0x000000004747b3e0 has index 0!
Libomptarget --> Registering image 0x0000000010020080 with RTL libomptarget.rtl.ppc64.so!
Libomptarget --> Done registering entries!
===== MANUAL CALL TO __tgt_register_requires() IN MAIN (top of MAIN function!) ========

Manually calling __tgt_register_requires can never actually work correctly because any user space call to this function will be after the binary has been loaded and the flags already decided. The compiler just has to support the handling of the requires clauses.

Aug 9 2019, 10:57 AM · Restricted Project, Restricted Project
Hahnfeld updated the summary of D66019: [libomptarget] Remove duplicate RTLRequiresFlags per device.
Aug 9 2019, 10:53 AM · Restricted Project, Restricted Project
Hahnfeld created D66019: [libomptarget] Remove duplicate RTLRequiresFlags per device.
Aug 9 2019, 10:53 AM · Restricted Project, Restricted Project
Hahnfeld added inline comments to D65001: [OpenMP][libomptarget] Add support for unified memory for regular maps.
Aug 9 2019, 7:34 AM · Restricted Project, Restricted Project
Hahnfeld added inline comments to D65001: [OpenMP][libomptarget] Add support for unified memory for regular maps.
Aug 9 2019, 3:44 AM · Restricted Project, Restricted Project
Hahnfeld added inline comments to D65340: [OpenMP][libomptarget] Add support for close map modifier.
Aug 9 2019, 2:59 AM · Restricted Project, Restricted Project

Aug 7 2019

Hahnfeld added inline comments to D65870: [OpenMP] Remove 'unnecessary parentheses'.
Aug 7 2019, 12:09 PM · Restricted Project, Restricted Project
Hahnfeld accepted D65885: Cleanup unused variable..

Thanks, that's even easier than a pointer to NULL :)

Aug 7 2019, 11:05 AM · Restricted Project, Restricted Project
Hahnfeld created D65871: [OpenMP] Enable warning about "implicit fallthrough".
Aug 7 2019, 6:40 AM · Restricted Project, Restricted Project
Hahnfeld created D65870: [OpenMP] Remove 'unnecessary parentheses'.
Aug 7 2019, 6:40 AM · Restricted Project, Restricted Project
Hahnfeld created D65869: [OMPT] Resolve warnings because of ints in if conditions.
Aug 7 2019, 6:40 AM · Restricted Project, Restricted Project
Hahnfeld created D65868: [OpenMP] Remove workaround for CMPXCHG.
Aug 7 2019, 6:40 AM · Restricted Project
Hahnfeld created D65867: [RFC] [OpenMP] Turn on -Wall compiler warnings by default.
Aug 7 2019, 6:40 AM · Restricted Project, Restricted Project

Aug 6 2019

Hahnfeld added a comment to D65819: [Driver][Bundler] Improve bundling of object files..

Can you detail what "incorrect linking" means? AFAIK the additional sections were just bloating the executable, but how do they affect correctness?

Aug 6 2019, 1:57 PM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65340: [OpenMP][libomptarget] Add support for close map modifier.

The test will currently fail with older versions of Clang. It must at least be marked UNSUPPORTED for Clang versions older than what-will-be Clang 10.

Additionally, I'd still like to see a small test with manual calls to __tgt_target_data_begin / _end if possible. I'm thinking of the following:

int *a = // malloc
int *device;

__tgt_target_data_begin(...); // with close modifier for a
#pragma omp target data use_device_ptr(a)
{
  device = a;
}
__tgt_target_data_end(...); // correspondingly to the begin call above

// check...

Instead of the nested target data region, you could also use a simple target region in the outer data region, and have a check for use_device_ptr in another test.

I don't mind adding such a test but calling these functions manually is very tedious and error prone and hard to maintain. Are there any benefits I'm missing to this apart from running this test in isolation?

Aug 6 2019, 8:11 AM · Restricted Project, Restricted Project
Hahnfeld requested changes to D65340: [OpenMP][libomptarget] Add support for close map modifier.

The test will currently fail with older versions of Clang. It must at least be marked UNSUPPORTED for Clang versions older than what-will-be Clang 10.

Aug 6 2019, 6:09 AM · Restricted Project, Restricted Project

Aug 3 2019

Hahnfeld added a comment to D65285: [OpenMP] Rename last file to cpp and remove LIBOMP_CFLAGS.

Apologies, but I think my fix for -Wcast-qual is wrong and the code is still broken. Luckily, the latest Intel Compiler still warns about it which forced me to rethink what the pointers try to achieve.

Aug 3 2019, 4:51 AM · Restricted Project, Restricted Project

Aug 2 2019

Hahnfeld added inline comments to D65340: [OpenMP][libomptarget] Add support for close map modifier.
Aug 2 2019, 1:19 PM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65340: [OpenMP][libomptarget] Add support for close map modifier.

I'd propose to mark the test close_modifier.c as unsupported with older compiler versions. Additionally, can you add a small, new test with manual calls to __tgt_target_data_begin / _end without relying on the compiler?

Aug 2 2019, 2:24 AM · Restricted Project, Restricted Project
Hahnfeld added inline comments to D65340: [OpenMP][libomptarget] Add support for close map modifier.
Aug 2 2019, 12:10 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65001: [OpenMP][libomptarget] Add support for unified memory for regular maps.

Oh, but the tests again look add. Please run them through clang-format.

Aug 2 2019, 12:02 AM · Restricted Project, Restricted Project

Aug 1 2019

Hahnfeld accepted D65001: [OpenMP][libomptarget] Add support for unified memory for regular maps.

I'm fine with the last update.

Aug 1 2019, 11:59 PM · Restricted Project, Restricted Project
Hahnfeld added inline comments to D64375: [OpenMP][Docs] Provide implementation status details.
Aug 1 2019, 11:55 PM · Restricted Project, Restricted Project
Hahnfeld removed a reviewer for D65341: [OpenMP] Add support for close map modifier in Clang: Hahnfeld.
Aug 1 2019, 9:38 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65340: [OpenMP][libomptarget] Add support for close map modifier.

I think this still needs some work.

Aug 1 2019, 9:26 AM · Restricted Project, Restricted Project
Hahnfeld requested changes to D65001: [OpenMP][libomptarget] Add support for unified memory for regular maps.

There's still no call to __tgt_register_requires in the two tests, so I guess they won't pass with older versions of Clang.

Aug 1 2019, 9:15 AM · Restricted Project, Restricted Project

Jul 31 2019

Hahnfeld added inline comments to D65001: [OpenMP][libomptarget] Add support for unified memory for regular maps.
Jul 31 2019, 9:56 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D65001: [OpenMP][libomptarget] Add support for unified memory for regular maps.

@Hahnfeld I cannot replace the usage of the requires pragma with the call to the registration function directly because the registration function is the first function that gets called so if I explicitely invoke it will only be the 2nd call to that function. A subsequent call with a different set of flags will lead to a mismatch in requires clauses error. (first implicit call is without unified_shared_memory and the second call is with unified_shared_memory).

Jul 31 2019, 12:44 AM · Restricted Project, Restricted Project