Page MenuHomePhabricator

dim (Dimitry Andric)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 15 2014, 12:19 PM (271 w, 8 h)

Recent Activity

Sun, Jun 23

dim added a comment to D63686: [LFTR] Fix post-inc pointer IV with truncated exit count (PR41998).

FWIW, the original test case with pre-increment is fixed by this, e.g.:

Sun, Jun 23, 2:23 PM · Restricted Project

Sat, Jun 15

dim abandoned D62873: Avoid building analyzer plugins if CLANG_ENABLE_STATIC_ANALYZER is OFF.

No longer needed after rC362328 and follow-ups.

Sat, Jun 15, 2:07 PM · Restricted Project

Tue, Jun 4

dim created D62873: Avoid building analyzer plugins if CLANG_ENABLE_STATIC_ANALYZER is OFF.
Tue, Jun 4, 12:48 PM · Restricted Project

May 13 2019

dim added a comment to D60748: Fix i386 struct and union parameter alignment.

In fact, it is probably better to turn the OS check around, e.g. *only* increase the alignment for Linux, and nowhere else.

May 13 2019, 4:01 AM · Restricted Project
dim updated subscribers of D60748: Fix i386 struct and union parameter alignment.

Please also exclude FreeBSD from these changes, since we care a lot about backwards compatibility, and specifically about alignment requirements. (We have run into many issues in our ports collection where upstream assumes everything is 16-byte aligned on i386, which is *NOT* ABI compliant.)

May 13 2019, 3:57 AM · Restricted Project

May 6 2019

dim added a comment to D60427: [ARM] Glue register copies to tail calls..

@efriedma any more work to be done on this? :)

May 6 2019, 11:07 AM · Restricted Project
dim committed rG181aff63fb14: Add non-SSE wrapper for __kmp_{load,store}_mxcsr (authored by dim).
Add non-SSE wrapper for __kmp_{load,store}_mxcsr
May 6 2019, 10:58 AM
dim committed rL360062: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.
Add non-SSE wrapper for __kmp_{load,store}_mxcsr
May 6 2019, 10:58 AM
dim committed rOMP360062: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.
Add non-SSE wrapper for __kmp_{load,store}_mxcsr
May 6 2019, 10:58 AM
dim closed D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.
May 6 2019, 10:57 AM · Restricted Project

May 4 2019

dim added a comment to D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.

So does this look better now?

May 4 2019, 5:58 AM · Restricted Project

May 1 2019

dim updated the diff for D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.

Address review comments:

  • Assign zero to pointed-to value in __kmp_store_mxcsr()
  • Use SSE specific stuff in KMP_OS_UNIX part only
May 1 2019, 12:53 PM · Restricted Project
dim committed rG147ce2334c96: Enable OpenMP build for 32-bit FreeBSD (authored by dim).
Enable OpenMP build for 32-bit FreeBSD
May 1 2019, 12:33 PM
dim committed rL359716: Enable OpenMP build for 32-bit FreeBSD.
Enable OpenMP build for 32-bit FreeBSD
May 1 2019, 12:32 PM
dim committed rOMP359716: Enable OpenMP build for 32-bit FreeBSD.
Enable OpenMP build for 32-bit FreeBSD
May 1 2019, 12:32 PM
dim closed D60917: Enable OpenMP build for 32-bit FreeBSD.
May 1 2019, 12:32 PM · Restricted Project
dim added a comment to D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.

Does the code that uses __kmp_load_mxcsr expect the pointed-to value to be initialized?

May 1 2019, 6:54 AM · Restricted Project
dim added a comment to D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.

Ping :)

May 1 2019, 4:09 AM · Restricted Project

Apr 22 2019

dim committed rG87e7f895bb2c: Use correct way to test for MIPS arch after rOMP355687 (authored by dim).
Use correct way to test for MIPS arch after rOMP355687
Apr 22 2019, 12:21 PM
dim committed rL358911: Use correct way to test for MIPS arch after rOMP355687.
Use correct way to test for MIPS arch after rOMP355687
Apr 22 2019, 12:19 PM
dim committed rOMP358911: Use correct way to test for MIPS arch after rOMP355687.
Use correct way to test for MIPS arch after rOMP355687
Apr 22 2019, 12:18 PM
dim closed D60938: Use correct way to test for MIPS arch after rOMP355687.
Apr 22 2019, 12:18 PM · Restricted Project

Apr 20 2019

dim created D60938: Use correct way to test for MIPS arch after rOMP355687.
Apr 20 2019, 1:00 PM · Restricted Project

Apr 19 2019

dim created D60917: Enable OpenMP build for 32-bit FreeBSD.
Apr 19 2019, 1:34 PM · Restricted Project
dim created D60916: Add non-SSE wrapper for __kmp_{load,store}_mxcsr.
Apr 19 2019, 1:28 PM · Restricted Project

Apr 9 2019

dim added a comment to D60427: [ARM] Glue register copies to tail calls..

I can confirm this fixes both the minimized test case from https://bugs.llvm.org/show_bug.cgi?id=41417, and the full original test case from https://bugs.freebsd.org/237074.

Apr 9 2019, 2:15 PM · Restricted Project

Apr 5 2019

dim committed rG8f2d1eb9e887: After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not complain when… (authored by dim).
After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not complain when…
Apr 5 2019, 3:19 PM
dim committed rOMP357828: After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not.
After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not
Apr 5 2019, 3:19 PM
dim committed rL357828: After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not.
After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not
Apr 5 2019, 3:19 PM

Apr 3 2019

dim committed rOMP357618: Ensure correct pthread flags and libraries are used.
Ensure correct pthread flags and libraries are used
Apr 3 2019, 11:54 AM
dim committed rG956168c8029b: Ensure correct pthread flags and libraries are used (authored by dim).
Ensure correct pthread flags and libraries are used
Apr 3 2019, 11:14 AM
dim committed rL357618: Ensure correct pthread flags and libraries are used.
Ensure correct pthread flags and libraries are used
Apr 3 2019, 11:10 AM
dim closed D59451: Fix gettid warnings and one test on FreeBSD.
Apr 3 2019, 11:10 AM · Restricted Project, Restricted Project

Apr 2 2019

dim updated the diff for D59451: Fix gettid warnings and one test on FreeBSD.
  • Only set OPENMP_TEST_COMPILER_OPENMP_FLAGS once.
  • For standalone builds, call find_package(Threads) and use the result unconditionally.
  • Fix else -> else().
Apr 2 2019, 12:34 PM · Restricted Project, Restricted Project

Apr 1 2019

dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.

So, any thoughts on the current state of the review?

Apr 1 2019, 10:41 AM · Restricted Project, Restricted Project

Mar 25 2019

dim committed rGa70da7f29f9d: Fix interoperability test compilation on FreeBSD (authored by dim).
Fix interoperability test compilation on FreeBSD
Mar 25 2019, 11:37 AM
dim committed rGdab9ed87c6c5: Fix gettid warnings on FreeBSD (authored by dim).
Fix gettid warnings on FreeBSD
Mar 25 2019, 11:37 AM
dim committed rL356936: Fix interoperability test compilation on FreeBSD.
Fix interoperability test compilation on FreeBSD
Mar 25 2019, 11:37 AM
dim committed rOMP356936: Fix interoperability test compilation on FreeBSD.
Fix interoperability test compilation on FreeBSD
Mar 25 2019, 11:37 AM
dim closed D59736: Fix interoperability test compilation on FreeBSD.
Mar 25 2019, 11:36 AM · Restricted Project
dim committed rL356934: Fix gettid warnings on FreeBSD.
Fix gettid warnings on FreeBSD
Mar 25 2019, 11:36 AM
dim committed rOMP356934: Fix gettid warnings on FreeBSD.
Fix gettid warnings on FreeBSD
Mar 25 2019, 11:36 AM
dim closed D59735: Fix gettid warnings on FreeBSD.
Mar 25 2019, 11:36 AM · Restricted Project

Mar 24 2019

dim updated the diff for D59451: Fix gettid warnings and one test on FreeBSD.
  • Use CMAKE_THREAD_LIBS_INIT verbatim, if it is not "-lpthread".
  • Add similar logic to DetectTestCompiler for standalone build.
Mar 24 2019, 11:56 AM · Restricted Project, Restricted Project
dim updated the diff for D59451: Fix gettid warnings and one test on FreeBSD.

Readdress the issue in a different way: add -pthread in the
OpenMPTesting.cmake file instead. The top-level LLVM config-ix.cmake file
mangles the value of the needed CMAKE_THREAD_LIBS_INIT variable, so derive the
flag from this, instead of directly using it.

Mar 24 2019, 8:01 AM · Restricted Project, Restricted Project

Mar 23 2019

dim updated subscribers of D59451: Fix gettid warnings and one test on FreeBSD.

Using CMake's own FindThreads package is obviously the correct solution for finding the right compiler and linker options for enabling threading.

Mar 23 2019, 2:02 PM · Restricted Project, Restricted Project
dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.

Split off the __kmp_gettid() fix to D59735, the <alloca.h> header fix to D59736. I will rebase this review and update it to add some CMake logic for pthread flag detection.

Mar 23 2019, 7:45 AM · Restricted Project, Restricted Project
dim created D59736: Fix interoperability test compilation on FreeBSD.
Mar 23 2019, 7:44 AM · Restricted Project
dim created D59735: Fix gettid warnings on FreeBSD.
Mar 23 2019, 7:40 AM · Restricted Project

Mar 17 2019

dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.
it's not with libc++ and newer libstdc++.

Some OSs merged libpthread into libc and/or implemented it almost fully in the kernel. It's not the case on NetBSD and apparently FreeBSD.

In libc there are just stubs for libpthread to allow linking but without defined interfaces, unless someone will link with the POSIX threading library.

Mar 17 2019, 10:56 AM · Restricted Project, Restricted Project
dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.
In D59451#1432251, @dim wrote:

This code does not directly use pthreads, but uses C++11 threads.
Why does the compiler not link the necessary threading library, when using C++11 threads?

How would the compiler know up-front what is in the code? I have not often seen compilers that influence linking flags from the code that was compiled, unless maybe the Microsoft specific #pragma lib feature (which somebody is now adding to clang, I believe). Usually, these kinds of flags are specified by the user, and passed from the frontend to the linker.

The point is that the test case is using std::thread and the compiler needs to link all libraries that are needed for the stdlib to work. If this includes libpthread that's up to the compiler, so I agree with Joachim that adding linking flags does not seem right.

Mar 17 2019, 4:39 AM · Restricted Project, Restricted Project

Mar 16 2019

dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.

This code does not directly use pthreads, but uses C++11 threads.
Why does the compiler not link the necessary threading library, when using C++11 threads?

Mar 16 2019, 1:02 PM · Restricted Project, Restricted Project
dim updated the diff for D59451: Fix gettid warnings and one test on FreeBSD.

Update to use -pthread instead.

Mar 16 2019, 8:25 AM · Restricted Project, Restricted Project
dim added a comment to D59451: Fix gettid warnings and one test on FreeBSD.

If we want to depend on pthread, please go for canonical -pthread.

Mar 16 2019, 5:38 AM · Restricted Project, Restricted Project
dim created D59451: Fix gettid warnings and one test on FreeBSD.
Mar 16 2019, 4:53 AM · Restricted Project, Restricted Project

Mar 11 2019

dim added a comment to D59201: [RegAllocHints] Avoid compile time regression.

Btw @jonpa, for me it's still interesting as to why the compiler hang only occurred for builds targeting i386 (i.e 32 bit x86), while x86_64 worked just fine. Is it due to the lower number of physical registers on i386?

Mar 11 2019, 11:10 AM
dim updated subscribers of D59201: [RegAllocHints] Avoid compile time regression.

@hans it's really late but if you're going to spin 8.0.0 rc5, it would be nice if this one gets merged too, after it's been committed. Or if not, I'll probably merge into the FreeBSD version of clang anyway, since we hit this issue first. :)

Mar 11 2019, 9:04 AM
dim added a comment to D59201: [RegAllocHints] Avoid compile time regression.

This helps quite a lot, in the sense that my original test case from PR40986 now at least compiles within a finite time. There is still a performance loss between clang 7.0.1 and clang 8.0.0 with this patch, though (tested with 10 runs each):

Mar 11 2019, 1:43 AM

Mar 6 2019

dim updated subscribers of rL349766: Replace MemoryRegionInfoSP with values and cleanup related code.
Mar 6 2019, 9:54 AM

Feb 27 2019

dim closed D58473: Fix a few swapped _LIBCPP_TEMPLATE_VIS attributes.

Fixed in rCXX355006. (@ldionne it would have been handy to include the "Differential Revision:" line in your commit message, then Phabricator would have picked it up. :)

Feb 27 2019, 1:56 PM

Feb 20 2019

dim committed rCXX354515: Fix the build with gcc when `-Wredundant-decls` is passed.
Fix the build with gcc when `-Wredundant-decls` is passed
Feb 20 2019, 1:19 PM
dim committed rGd95da99b9159: Fix the build with gcc when `-Wredundant-decls` is passed (authored by dim).
Fix the build with gcc when `-Wredundant-decls` is passed
Feb 20 2019, 1:02 PM
dim committed rL354515: Fix the build with gcc when `-Wredundant-decls` is passed.
Fix the build with gcc when `-Wredundant-decls` is passed
Feb 20 2019, 1:01 PM
dim closed D58425: Fix the build with gcc 8.x when `-Wredundant-decls` is passed.
Feb 20 2019, 1:01 PM · Restricted Project, Restricted Project
dim commandeered D58425: Fix the build with gcc 8.x when `-Wredundant-decls` is passed.

I will update and commit.

Feb 20 2019, 12:56 PM · Restricted Project, Restricted Project
dim created D58473: Fix a few swapped _LIBCPP_TEMPLATE_VIS attributes.
Feb 20 2019, 12:48 PM
dim added a comment to D58425: Fix the build with gcc 8.x when `-Wredundant-decls` is passed.

In the case of <__locale>, __throw_runtime_error is already used in the file before its declaration, but via transitive includes, <stdexcept> is also included earlier, so it gets the duplicate declaration of __throw_runtime_error from there. I think we can just delete the __throw_runtime_error declaration from <__locale> altogether.

Feb 20 2019, 4:03 AM · Restricted Project, Restricted Project

Feb 6 2019

dim added inline comments to D57735: [X86] Add FPCW as a register and start using it as an implicit use on floating point instructions..
Feb 6 2019, 12:58 PM · Restricted Project

Feb 5 2019

dim added a comment to D57735: [X86] Add FPCW as a register and start using it as an implicit use on floating point instructions..

For what it's worth, this builds and tests correctly for me, and also appears to solve the test cases from bug 40206.

Feb 5 2019, 2:49 AM · Restricted Project

Jan 29 2019

dim committed rLLD352606: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.
Recognize FreeBSD specific BFD names in OUTPUT_FORMAT
Jan 29 2019, 10:32 PM
dim committed rL352606: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.
Recognize FreeBSD specific BFD names in OUTPUT_FORMAT
Jan 29 2019, 10:31 PM
dim closed D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.
Jan 29 2019, 10:31 PM
dim updated the diff for D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.

Updated as @ruiu suggested.

Jan 29 2019, 2:03 PM
dim updated the diff for D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.

Rebased.

Jan 29 2019, 9:41 AM
dim updated the diff for D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.

Updated to address comments:

  • Replaced tuple with BfdDesc struct
  • Parse -freebsd suffix to determine OSABI
  • Add new case for elf-aarch64 (which used to be elf-aarch64-freebsd)
Jan 29 2019, 3:08 AM

Jan 28 2019

dim added inline comments to D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.
Jan 28 2019, 4:03 AM

Jan 26 2019

dim created D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT.
Jan 26 2019, 9:07 AM

Jan 25 2019

dim committed rCRT352234: Fix XRayTest link on FreeBSD (and likely NetBSD too).
Fix XRayTest link on FreeBSD (and likely NetBSD too)
Jan 25 2019, 11:36 AM
dim committed rL352234: Fix XRayTest link on FreeBSD (and likely NetBSD too).
Fix XRayTest link on FreeBSD (and likely NetBSD too)
Jan 25 2019, 11:36 AM
dim closed D57181: Fix XRayTest link on FreeBSD (and likely NetBSD too).
Jan 25 2019, 11:36 AM

Jan 24 2019

dim created D57181: Fix XRayTest link on FreeBSD (and likely NetBSD too).
Jan 24 2019, 12:38 PM

Jan 20 2019

dim accepted D56975: [Support] Reimplement getMainExecutable() using sysctl on NetBSD.

I can't vouch for the NetBSD part, but this definitely seems like a good idea to me. I'm unsure if the sysctl is already fixed on the FreeBSD side. @emaste any idea?

Jan 20 2019, 6:07 AM · Restricted Project

Jan 7 2019

dim created D56398: Add new EINTEGRITY errno.
Jan 7 2019, 10:45 AM

Dec 25 2018

dim updated subscribers of rL329339: [X86] Remove some InstRWs for plain store instructions on Sandy Bridge..

I'm not sure yet why, but this revision breaks unrolling of some loops in FreeBSD's lib/msun/ld80/e_powl.c, specifically the one in __polevll here, which gets expanded in two places, one instance with a count of 3:

Dec 25 2018, 5:56 AM

Dec 23 2018

dim committed rCRT350020: Set the default SANITIZER_CXX_ABI library to libc++ for FreeBSD, and.
Set the default SANITIZER_CXX_ABI library to libc++ for FreeBSD, and
Dec 23 2018, 3:54 AM
dim committed rL350020: Set the default SANITIZER_CXX_ABI library to libc++ for FreeBSD, and.
Set the default SANITIZER_CXX_ABI library to libc++ for FreeBSD, and
Dec 23 2018, 3:53 AM

Dec 20 2018

dim accepted D55916: [clang] Replace getOS() == llvm::Triple::*BSD with isOS*BSD() [NFCI].
Dec 20 2018, 4:38 AM

Dec 16 2018

dim added a comment to D55576: [libcxx] [test] [support] Use socket()+bind() to create unix sockets portably.

@dim, thanks for the review. Should I also try removing the following restriction?

#if !defined(__APPLE__) && !defined(__FreeBSD__) // No support for domain sockets
        {env.create_socket("socket"), file_type::socket},
#endif
Dec 16 2018, 7:42 AM
dim accepted D55576: [libcxx] [test] [support] Use socket()+bind() to create unix sockets portably.

LGTM.

Dec 16 2018, 7:10 AM

Nov 20 2018

dim added a comment to D54724: [Driver] Automatically include C++ library dependencies.
In D54724#1303809, @dim wrote:

I think this is the wrong direction, placing "common" code in addCXXStdlibLinkDeps, which then has all kinds of ugly ifs and switches for different OSes? Let different OSes handle this in their own way, maybe.

You mean handling this in individual ToolChain subclasses? I've considered doing that. The reason I went with a single method is because we already use this approach for other types of runtimes like sanitizers, XRay, etc. There'd be still some duplication for handling different C++ libraries, but I'd be fine changing the implementation to use that approach if there's a strong preference for doing so.

Nov 20 2018, 11:00 PM

Nov 19 2018

dim added a comment to D54724: [Driver] Automatically include C++ library dependencies.

I think this is the wrong direction, placing "common" code in addCXXStdlibLinkDeps, which then has all kinds of ugly ifs and switches for different OSes? Let different OSes handle this in their own way, maybe.

Nov 19 2018, 10:54 PM

Nov 18 2018

dim accepted D54650: Swap order of discovering of -ltinfo and -lterminfo.

On FreeBSD, there is no libterminfo either, so LGTM.

Nov 18 2018, 3:25 AM

Oct 22 2018

dim committed rL345002: Don't mess up RelIplt symbols during relocatable processing.
Don't mess up RelIplt symbols during relocatable processing
Oct 22 2018, 10:56 PM
dim committed rLLD345002: Don't mess up RelIplt symbols during relocatable processing.
Don't mess up RelIplt symbols during relocatable processing
Oct 22 2018, 10:56 PM
dim closed D53515: Don't mess up RelIplt symbols during relocatable processing.
Oct 22 2018, 10:56 PM
dim created D53515: Don't mess up RelIplt symbols during relocatable processing.
Oct 22 2018, 11:05 AM

Oct 11 2018

dim added a comment to rL325887: [ELF] - Do not remove empty output sections that are explicitly assigned to….

I think that the inconsistency of linkers behavior shown above shows that LLD behavior is
not incorrect. It is different. But we never tried to be fully bug compatible with bfd/gold.
First of all the problem is caused by a weak assumption in the linker script, which assumes
that orphans are placed at the particular place before the assignment command,
and my feeling it should be fixed.

Oct 11 2018, 1:16 PM

Oct 8 2018

dim added a comment to rL325887: [ELF] - Do not remove empty output sections that are explicitly assigned to….

Here is the shortest test case I could come up with. (This uses ld.lld-r325886, but it could also use ld.lld 6.0.1.)

Oct 8 2018, 1:16 PM
dim added a comment to rL325887: [ELF] - Do not remove empty output sections that are explicitly assigned to….

I am still debugging it, but one observation to mention:

If you remove the .data1 : { *(.data1) } line from the script,
(https://github.com/freebsd/freebsd/blob/master/sys/conf/ldscript.i386#L141)
you'll get the same result as after this patch

.data1 is the empty section and it is anyways removed. But with this patch, it is done a bit earlier, what does not
allows our orphan placement algorithm to see/use it for finding the insertion point.

So it is just a luck that the script worked before this revision.

Oct 8 2018, 12:22 PM

Oct 6 2018

dim added a comment to rL325887: [ELF] - Do not remove empty output sections that are explicitly assigned to….

My guess it happens because of set_sysinit_set, set_sysuninit_set, set_pcpu, set_vnet are orphans (not listed in the linker script),
and our algorithm of placing the orphans started to place them in between of
(https://github.com/freebsd/freebsd/blob/master/sys/conf/ldscript.i386#L142)

_edata = .; PROVIDE (edata = .);
__bss_start = .;

for some reason. And honestly, I would not call this incorrect behavior, though I do not understand now how this patch could affect this.

Oct 6 2018, 11:58 AM