Page MenuHomePhabricator

dim (Dimitry Andric)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 15 2014, 12:19 PM (466 w, 4 d)

Recent Activity

Fri, Mar 24

dim committed rTccf81ff7776f: [test-suite] Avoid segfault in CLAMR test on non-Linux systems (authored by dim).
[test-suite] Avoid segfault in CLAMR test on non-Linux systems
Fri, Mar 24, 11:03 AM · Restricted Project
dim closed D146387: [test-suite] Avoid segfault in CLAMR test on non-Linux systems.
Fri, Mar 24, 11:03 AM · Restricted Project

Sun, Mar 19

dim requested review of D146387: [test-suite] Avoid segfault in CLAMR test on non-Linux systems.
Sun, Mar 19, 11:45 AM · Restricted Project
dim accepted D146374: [test-suite] Disable CLAMR fmemopen() substitute function on FreeBSD / OpenBSD and AIX.

LGTM

Sun, Mar 19, 4:04 AM · Restricted Project
dim accepted D146373: [test-suite] Fix OpenBSD build.

LGTM

Sun, Mar 19, 3:48 AM · Restricted Project
dim committed rT7b21b9ec2f2e: [test-suite] Fix FreeBSD and OpenBSD builds (authored by dim).
[test-suite] Fix FreeBSD and OpenBSD builds
Sun, Mar 19, 3:36 AM · Restricted Project
dim closed D146251: [test-suite] Fix FreeBSD and OpenBSD builds.
Sun, Mar 19, 3:36 AM · Restricted Project

Sat, Mar 18

dim updated the diff for D146251: [test-suite] Fix FreeBSD and OpenBSD builds.

Uploaded wrong commit.

Sat, Mar 18, 4:54 PM · Restricted Project
dim updated the diff for D146251: [test-suite] Fix FreeBSD and OpenBSD builds.

Simplify.

Sat, Mar 18, 4:52 PM · Restricted Project
dim added a comment to D146251: [test-suite] Fix FreeBSD and OpenBSD builds.

Looks like all three OS's have tgmath.h as well. Why not just make this

#if defined(__MINGW32__)
#include <complex.h>
#elif defined(__APPLE__)
#include <math.h>
#else
#include <tgmath.h>
#endif

For now, unless you can also build test on macOS?

Sat, Mar 18, 4:46 PM · Restricted Project

Thu, Mar 16

dim requested review of D146251: [test-suite] Fix FreeBSD and OpenBSD builds.
Thu, Mar 16, 11:40 AM · Restricted Project

Mon, Mar 13

dim added a comment to D145997: workflows/release-tasks: Fix missing suffix on doxygen tarballs.

Is the -srcdir option no longer needed?

Mon, Mar 13, 4:05 PM · Restricted Project, Restricted Project
dim abandoned D119624: [PowerPC] Avoid generating 128-bit __multi3() and __muloti4() on 32-bit.

This was already fixed by @aaronpuchert in rGc1a31ee65b3a2bf2b452febb99703b3fdfa43328, in a slightly different way, but functionally equivalent. Test cases were also updated.

Mon, Mar 13, 11:32 AM · Restricted Project, Restricted Project
dim added a comment to D145884: test-release.sh: build projects and runtimes lists with semicolons.

With this, could we get rid of project_list and runtime_list and just use projects and runtimes directly throughout?

Mon, Mar 13, 8:55 AM · Restricted Project, Restricted Project

Sun, Mar 12

dim requested review of D145884: test-release.sh: build projects and runtimes lists with semicolons.
Sun, Mar 12, 11:55 AM · Restricted Project, Restricted Project

Tue, Mar 7

dim accepted D145237: [builtins] Only build float16/bfloat16 code if actually supported.

Yes, this looks good to me. Tried with very recent main:

Tue, Mar 7, 11:19 AM · Restricted Project, Restricted Project

Mon, Mar 6

dim added inline comments to D145237: [builtins] Only build float16/bfloat16 code if actually supported.
Mon, Mar 6, 7:06 AM · Restricted Project, Restricted Project

Sat, Mar 4

dim accepted D144823: [Driver][FreeBSD] Simplify ARM handling.

I think this is fine. @emaste can you think of any objections? 8 and 9 are long gone.

Sat, Mar 4, 4:09 PM · Restricted Project, Restricted Project, Restricted Project

Fri, Mar 3

dim added a comment to D145237: [builtins] Only build float16/bfloat16 code if actually supported.

Note that the original problem was not only about _Float16 (COMPILER_RT_HAS_FLOAT16 in CMake), but also __bf16 (COMPILER_RT_HAS_BFLOAT16 in CMake). Both failed on i386-freebsd.

Fri, Mar 3, 6:39 AM · Restricted Project, Restricted Project

Mon, Feb 27

dim closed D144232: [PowerPC] Correctly use ELFv2 ABI on FreeBSD/powerpc64.
Mon, Feb 27, 12:03 PM · Restricted Project, Restricted Project, Restricted Project

Sat, Feb 25

dim accepted D144778: [Driver][FreeBSD] Further simplify the Driver handling for older FreeBSD releases.

LGTM, are there no test cases which are affected by this?

Sat, Feb 25, 5:24 AM · Restricted Project, Restricted Project

Feb 21 2023

dim accepted D144444: [PowerPC] Use member function to determine PowerPC Secure PLT.

LGTM

Feb 21 2023, 10:28 AM · Restricted Project, Restricted Project, Restricted Project
dim added a comment to D144444: [PowerPC] Use member function to determine PowerPC Secure PLT.

isPPC32SecurePlt is probably more accurate.

Feb 21 2023, 9:58 AM · Restricted Project, Restricted Project, Restricted Project
dim accepted D144444: [PowerPC] Use member function to determine PowerPC Secure PLT.

Yes, this is quite a bit nicer. Maybe run the isPPCSecurePlt() function through clang-format, just to be sure of the style?

Feb 21 2023, 6:53 AM · Restricted Project, Restricted Project, Restricted Project
dim accepted D144341: [Driver][FreeBSD] Correct driver behavior if a triple is provided without a version.

LGTM, but I'll let @dim and @emaste decide if FreeBSD 8 code is still needed.

Feb 21 2023, 2:04 AM · Restricted Project, Restricted Project

Feb 20 2023

dim accepted D144321: [PowerPC] Correctly use ELFv2 ABI on all OS's that use the ELFv2 ABI.

Yeah, this looks quite a bit nicer, and should be more maintainable. Thanks.

Feb 20 2023, 1:30 AM · Restricted Project, Restricted Project, Restricted Project

Feb 18 2023

dim added a reviewer for D144321: [PowerPC] Correctly use ELFv2 ABI on all OS's that use the ELFv2 ABI: pkubaj.
Feb 18 2023, 4:43 PM · Restricted Project, Restricted Project, Restricted Project
dim accepted D144321: [PowerPC] Correctly use ELFv2 ABI on all OS's that use the ELFv2 ABI.

LGTM, some minor clang-format nits, but these aren't critical (to me at least :)

Feb 18 2023, 4:42 PM · Restricted Project, Restricted Project, Restricted Project
dim added a comment to D144232: [PowerPC] Correctly use ELFv2 ABI on FreeBSD/powerpc64.

I noticed this review. I have provided a more complete diff for review at D144321.

Feb 18 2023, 4:22 PM · Restricted Project, Restricted Project, Restricted Project

Jan 24 2023

dim accepted D142417: test-release.sh: Use parallel xz for packaging the binaries.

Yes, this should save some time while compressing.

Jan 24 2023, 12:26 AM · Restricted Project, Restricted Project

Jan 23 2023

dim added a comment to D136044: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd.

Ugh, this is really a messy situation. COMPILER_RT_HAS_FLOAT16 (as a CMake feature) is also used in compiler-rt/test/builtins/CMakeLists.txt, where it is unconditionally used for each arch. I received some failures in buildbots, e.g.:

Jan 23 2023, 10:11 AM · Restricted Project, Restricted Project
dim added a comment to D110471: [Sanitizers] intercept hexdump on FreeBSD.

hexdump looks like to come from libmba, not a critical component (libc is usually difficult to instrument, but other libraries are not). I think the user should compile libmba with instrumentation instead of adding interceptors to sanitizers (which adds complexity). @dim @emaste

Jan 23 2023, 8:22 AM · Restricted Project, Restricted Project
dim added a reverting change for rG45368c75582f: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd: rGabf399737ea8: Revert "[compiler-rt][builtins] Skip building (b)float16 support on i386….
Jan 23 2023, 2:23 AM · Restricted Project, Restricted Project
dim committed rGabf399737ea8: Revert "[compiler-rt][builtins] Skip building (b)float16 support on i386… (authored by dim).
Revert "[compiler-rt][builtins] Skip building (b)float16 support on i386…
Jan 23 2023, 2:23 AM · Restricted Project, Restricted Project
dim added a reverting change for D136044: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd: rGabf399737ea8: Revert "[compiler-rt][builtins] Skip building (b)float16 support on i386….
Jan 23 2023, 2:22 AM · Restricted Project, Restricted Project

Jan 22 2023

dim committed rG45368c75582f: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd (authored by dim).
[compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd
Jan 22 2023, 1:17 PM · Restricted Project, Restricted Project
dim closed D136044: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd.
Jan 22 2023, 1:17 PM · Restricted Project, Restricted Project
dim abandoned D130718: [compiler-rt] [builtins] Detect _Float16 support at compile time.

Abandoning in favor of D136044.

Jan 22 2023, 1:16 PM · Restricted Project, Restricted Project
dim updated the diff for D136044: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd.

Rebase onto main.

Jan 22 2023, 1:15 PM · Restricted Project, Restricted Project
dim added a comment to D136044: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd.

Btw these changes are independent of whether -m32 is used or not, they only check ${arch}. So if compiler-rt is ever changed to go over all support arches with e.g. -target x-y-z, this change would still work as-is. I'm mostly interested in getting the out-of-the-box build going on FreeBSD again, as it has been broken since 15.0.0.

Jan 22 2023, 1:07 PM · Restricted Project, Restricted Project

Dec 17 2022

dim added a comment to D139752: cmake: Enable 64bit off_t on 32bit glibc systems.

FWIW the BSDs never had lseek64; off_t was 64 bit from the original BSD 4.4 Lite sources... :)

Dec 17 2022, 4:55 PM · Restricted Project, Restricted Project

Dec 15 2022

dim committed rG2a48c5f5d597: [WindowsDriver] Improve VSInstallPath check for IDE subdirectory (authored by dim).
[WindowsDriver] Improve VSInstallPath check for IDE subdirectory
Dec 15 2022, 12:39 PM · Restricted Project, Restricted Project
dim added a reverting change for rGcc40dacbd0b7: [WindowsDriver] Improve VSInstallPath check for IDE subdirectory: rG9428084a20a8: Revert "[WindowsDriver] Improve VSInstallPath check for IDE subdirectory".
Dec 15 2022, 12:39 PM · Restricted Project, Restricted Project
dim committed rG9428084a20a8: Revert "[WindowsDriver] Improve VSInstallPath check for IDE subdirectory" (authored by dim).
Revert "[WindowsDriver] Improve VSInstallPath check for IDE subdirectory"
Dec 15 2022, 12:39 PM · Restricted Project, Restricted Project
dim added a reverting change for D140019: [WindowsDriver] Improve VSInstallPath check for IDE subdirectory: rG9428084a20a8: Revert "[WindowsDriver] Improve VSInstallPath check for IDE subdirectory".
Dec 15 2022, 12:39 PM · Restricted Project, Restricted Project
dim committed rGcc40dacbd0b7: [WindowsDriver] Improve VSInstallPath check for IDE subdirectory (authored by dim).
[WindowsDriver] Improve VSInstallPath check for IDE subdirectory
Dec 15 2022, 12:32 PM · Restricted Project, Restricted Project
dim closed D140019: [WindowsDriver] Improve VSInstallPath check for IDE subdirectory.
Dec 15 2022, 12:32 PM · Restricted Project, Restricted Project

Dec 14 2022

dim requested review of D140019: [WindowsDriver] Improve VSInstallPath check for IDE subdirectory.
Dec 14 2022, 6:02 AM · Restricted Project, Restricted Project

Nov 9 2022

dim added a comment to D130718: [compiler-rt] [builtins] Detect _Float16 support at compile time.

What do we need to move forward with the patch?

HEAD as-is is broken on Ubuntu 22.10
https://lab.llvm.org/buildbot/#/builders/169/builds/13450/steps/7/logs/stdio

I noticed the bot is starting to fail 3 days ago, but the patch merged for months. Is there any recent change exposed the problem?

As disscussed in https://discourse.llvm.org/t/how-to-build-compiler-rt-for-new-x86-half-float-abi/63366/25 the build of 32-bits using 64-bit config is the root cause. I think always turning on SSE2 explicitly in the 64-bit config should be a feasible workaround.

Nov 9 2022, 2:58 AM · Restricted Project, Restricted Project

Oct 16 2022

dim added a comment to D136044: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd.

What is being done for things like 64bit atomics and int128 support? Surely that will have the same problem?

Oct 16 2022, 3:17 PM · Restricted Project, Restricted Project
dim added a comment to D136044: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd.

Another note to clarify: the problem is that the builtins are built *twice*, once for x86_64 and once for i386, the latter using the -m32 compiler flag. In the CMake configuration phase however, the feature detection is always done with the default compiler flags, i.e. without -m32, and therefore it will find features that aren't supported for 32-bit targets.

Oct 16 2022, 11:33 AM · Restricted Project, Restricted Project
dim updated subscribers of D136044: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd.

@brooks btw didn't you encounter this problem during llvm-devel port builds ? E.g. it dies with:

Oct 16 2022, 11:30 AM · Restricted Project, Restricted Project
dim requested review of D136044: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd.
Oct 16 2022, 11:27 AM · Restricted Project, Restricted Project

Oct 4 2022

dim accepted D135171: FreeBSD: enable __float128 on x86.

LGTM

Oct 4 2022, 9:12 AM · Restricted Project, Restricted Project

Sep 14 2022

dim accepted D110126: [CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on *BSD.

Yes, this should probably be fine for 16.

Sep 14 2022, 1:04 AM · Restricted Project, Restricted Project

Aug 20 2022

dim updated subscribers of D110126: [CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on *BSD.

I'm fine with it, adding @brooks so he's aware for the FreeBSD llvm port.

Aug 20 2022, 1:59 AM · Restricted Project, Restricted Project

Aug 7 2022

dim added a comment to D131037: [libc++] Simplify how we define the linker script for libc++.

So I've been trying again with the following diff applied on top of this one:

Aug 7 2022, 1:58 AM · Restricted Project, Restricted Project

Aug 5 2022

dim committed rG45c056b1fb5a: [CMake] Find python before searching for python modules (authored by dim).
[CMake] Find python before searching for python modules
Aug 5 2022, 1:48 AM · Restricted Project, Restricted Project
dim closed D131191: [CMake] Find python before searching for python modules.
Aug 5 2022, 1:48 AM · Restricted Project, Restricted Project
dim updated the diff for D131191: [CMake] Find python before searching for python modules.

Address review comments.

Aug 5 2022, 1:45 AM · Restricted Project, Restricted Project
dim abandoned D131248: Address review comments..
Aug 5 2022, 1:44 AM · Restricted Project, Restricted Project
dim requested review of D131248: Address review comments..
Aug 5 2022, 1:44 AM · Restricted Project, Restricted Project

Aug 4 2022

dim requested review of D131191: [CMake] Find python before searching for python modules.
Aug 4 2022, 12:11 PM · Restricted Project, Restricted Project

Aug 3 2022

dim added a comment to D131037: [libc++] Simplify how we define the linker script for libc++.

Unfortunately it doesn't really change anything on the FreeBSD build side. It still shows similar output when I put some messages in there:

Aug 3 2022, 11:13 AM · Restricted Project, Restricted Project
dim added a comment to D131057: [Sema] -Wformat: support C23 format specifier %b %B.

GCC 12 -Wformat -pedantic emits a warning:

warning: ISO C17 does not support the ‘%b’ gnu_printf format [-Wformat=]

The behavior is not ported (and it's unclear to me how to implement it).

Aug 3 2022, 11:04 AM · Restricted Project, Restricted Project
dim accepted D131057: [Sema] -Wformat: support C23 format specifier %b %B.

LGTM.

Aug 3 2022, 10:58 AM · Restricted Project, Restricted Project

Jul 30 2022

dim added a comment to D130718: [compiler-rt] [builtins] Detect _Float16 support at compile time.

Okay, so do we continue with this approach at all, then? The problem that x86_64 builds fail by default on non-gcc compilers still stands. I'm just not good enough in handling the CMake logic to figure that out, if we have to handle it via CMake.

Jul 30 2022, 1:55 AM · Restricted Project, Restricted Project

Jul 29 2022

dim committed rGce6d40f5c239: [compiler-rt] [builtins] Detect _Float16 support at compile time (authored by dim).
[compiler-rt] [builtins] Detect _Float16 support at compile time
Jul 29 2022, 11:59 AM · Restricted Project, Restricted Project
dim closed D130718: [compiler-rt] [builtins] Detect _Float16 support at compile time.
Jul 29 2022, 11:59 AM · Restricted Project, Restricted Project
dim added a comment to D130718: [compiler-rt] [builtins] Detect _Float16 support at compile time.

@kparzysz reminded me. This is not the right direction to solve the problem. The ABI of runtime libraries should be constant rather than changing with different features. Imagining a program may be built with or without SSE2 and linked with the same runtime. Another problem is compatibility with libgcc. Using uint16_t is not compatible with libgcc anymore.

Fortunately, LLVM codegen (unfortunately Darwin isn't) was using __gnu_h2f_ieee/__gnu_f2h_ieee before the change https://godbolt.org/z/GnrT5vGr1. So an easy way to solve the problem is always assign -msse2 when build extendhftf2/trunctfhf2.

I have a patch D128872 for Darwin targets, I hope we can put it into the 15.x release.

Jul 29 2022, 11:57 AM · Restricted Project, Restricted Project

Jul 28 2022

dim added a comment to D130718: [compiler-rt] [builtins] Detect _Float16 support at compile time.

Is this something we need in the release branch?

Jul 28 2022, 1:18 PM · Restricted Project, Restricted Project
dim updated the diff for D130718: [compiler-rt] [builtins] Detect _Float16 support at compile time.

Fix typo.

Jul 28 2022, 10:59 AM · Restricted Project, Restricted Project
dim requested review of D130718: [compiler-rt] [builtins] Detect _Float16 support at compile time.
Jul 28 2022, 10:58 AM · Restricted Project, Restricted Project

Jul 19 2022

dim accepted D130063: [Driver] Enable sanitizers on FreeBSD AArch64.

LGTM, are there any tests that need to be enabled explicitly?

Jul 19 2022, 1:44 AM · Restricted Project, Restricted Project

Jul 12 2022

dim requested review of D129587: [Support] Enable BLAKE3 .note.GNU-stack sections on FreeBSD.
Jul 12 2022, 1:12 PM · Restricted Project, Restricted Project

Jul 3 2022

dim added a comment to D123177: [libomptarget] Add device RTL to regression test dependencies..

This fails to configure in cmake when enabled as a project.

$ cmake ../llvm -DLLVM_ENABLE_PROJECTS='llvm;clang;lld;openmp'
...
-- Configuring done
CMake Error at /home/bed22/git/llvm-project/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt:74 (add_dependencies):
  The dependency target "omptarget.devicertl.amdgpu" of target
  "omptarget.rtl.amdgpu" does not exist.


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

Reverting this commit allows cmake to succeed. The linkage fix in rG2e0cb61570ec does not fix this issue.

Jul 3 2022, 7:27 AM · Restricted Project, Restricted Project

Jun 18 2022

dim added a comment to D124118: [Peephole-Opt][X86] Enhance peephole opt to see through SUBREG_TO_REG (following AND) and eliminates redundant TEST instruction..

FYI https://github.com/llvm/llvm-project/issues/56103

Jun 18 2022, 4:23 AM · Restricted Project, Restricted Project

Jun 4 2022

dim added a comment to D126882: [libc++] Do not yield from __sp_mut::lock().

To answer my own question partially, the original commit is Howard's: rG088e37c77aafaec5ead8fbe7ebf918265e6b86f2:

Despite my pathological distrust of spin locks, the number just don't lie. I've put a small spin in __sp_mut::lock() on std::mutex::try_lock(), which is testing quite well. In my experience, putting in a yield for every failed iteration is also a major performance booster. This change makes one of the performance tests I was using (a highly contended one) run about 20 times faster.

Jun 4 2022, 7:45 AM · Restricted Project, Restricted Project
dim added a comment to D126882: [libc++] Do not yield from __sp_mut::lock().

This patch was put together in collaboration with a performance engineer on our side. It was tested with a use case that was previously problematic and this patch did solve the issue. We believe this should be an improvement for all OSes if their pthread_mutex_lock is reasonable (which is the case on Linux and Apple at least)

Jun 4 2022, 7:41 AM · Restricted Project, Restricted Project

May 31 2022

dim added a comment to D126462: [libc++] Re-enable std::pair trivial copy constructor for FreeBSD >= 14.

In any case it would be nice if it was possible to decide whether ABIv2 will be pinned down (and ABIv3 is made into the 'new' unstable) before 15.0 is branched. :-)

May 31 2022, 11:04 AM · Restricted Project, Restricted Project

May 26 2022

dim added a comment to D126462: [libc++] Re-enable std::pair trivial copy constructor for FreeBSD >= 14.

...

But for 14.0, which is our trunk/main/head, there is no such ABI promise, therefore we can simply bump libc++.so to .2 now and fix the issue that way. If the upstream libc++ ABI version gets bumped to 2 though, we'll have to bump our .so to .3 I'm afraid, since the ELF soversion doesn't really allow "half-sized" version numbers.

Do you have to bump the version now or would it be possible for you to wait maybe one or two months so we can get things sorted out upstream?

May 26 2022, 11:45 AM · Restricted Project, Restricted Project
dim added a comment to D126462: [libc++] Re-enable std::pair trivial copy constructor for FreeBSD >= 14.

Sounds good to me. We can bump the .so version in the base system, but how do we treat it upstream (i.e., here in llvm) and in the ports tree?

Would it make sense from your side to to declare ABIv2 stable?

May 26 2022, 9:23 AM · Restricted Project, Restricted Project
dim requested review of D126462: [libc++] Re-enable std::pair trivial copy constructor for FreeBSD >= 14.
May 26 2022, 6:47 AM · Restricted Project, Restricted Project
dim added a comment to D125611: DWARFVerifier: Change vector of IntervalMap to vector of unique_ptrs.

Thanks a lot. I'll make sure to put up a libc++ review now to get rid of the FreeBSD std::pair problem in the future! :)

May 26 2022, 5:37 AM · Restricted Project, Restricted Project

May 23 2022

dim added a comment to D125899: [ADT] Add copy constructor to IntervalMap.

Will this fix FreeBSD 12 (and maybe 11?). FreeBSD 12 is still very much supported.

May 23 2022, 7:16 AM · Restricted Project, Restricted Project

May 21 2022

dim added a comment to D125899: [ADT] Add copy constructor to IntervalMap.

...

There's a subtle difference between the two std::vector constructors, mentioned at https://en.cppreference.com/w/cpp/container/vector/vector, where variant 3 is "Constructs the container with count copies of elements with value value" (so it needs a copy constructor), and variant 4 is "Constructs the container with count default-inserted instances of T. No copies are made". E.g. the latter should not require a copy constructor, but just a default constructor.

May 21 2022, 3:36 AM · Restricted Project, Restricted Project
dim added a comment to D125899: [ADT] Add copy constructor to IntervalMap.

Changed the copy to a deep one.

Ah, if the type wasn't deep copying before - ie: its default copy operation wasn't actually valid/probably would've resulted in duplicate free/delete/etc and generally been broken. Then my use case was just getting lucky because it was copying empty maps.

If that's the case, then maybe that does argue in favor of the unique_ptr solution/marking the broken copy ctor as deleted. (or figuring out some way to do the construction in-place in my case without using copying)

I'll take a closer look.

May 21 2022, 2:27 AM · Restricted Project, Restricted Project

May 17 2022

dim added a comment to D125611: DWARFVerifier: Change vector of IntervalMap to vector of unique_ptrs.

...

Ultimately, this is caused by _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR in /usr/include/c++/v1/__config (this was last modified by @EricWF, but a long time ago). If this setting is enabled (to preserve the old ABI), std::pair will always have a non-trivial copy constructor, and since IntervalMap contains a std::pair (via RootLeaf -> IntervalMapImpl::LeafNode -> NodeBase<std::pair<KeyT, KeyT>, ValT, N>), IntervalMap itself is also non-trivially copyable. std::vector in turn requires its value type to be copy-constructible (at least certainly when you use the constructor with a size).

I was hoping something I could reproduce without having FreeBSD myself - either on godbolt (though godbolt might not have different OS platforms as a primary feature) or something like that. Or a brief example that emulates the quirk of FreeBSD to better understand what we're working around here.

May 17 2022, 2:26 PM · Restricted Project, Restricted Project
dim accepted D125746: [PowerPC] Treat llvm.fmuladd intrinsic as using CTR.

I can confirm that this fixes both my original full test case, and the minimized variant. Since this change resembles D78668, I think it is relatively safe to apply now, and merge to the release/14.x branch?

May 17 2022, 11:16 AM · Restricted Project, Restricted Project
dim updated subscribers of D125611: DWARFVerifier: Change vector of IntervalMap to vector of unique_ptrs.

Some more details on the specifics in the patch description would be good - I'm still not 100% clear on the reproduction case to understand what we're working around, exactly. Do you have a godbolt reproduction/small example, by chance?

May 17 2022, 8:58 AM · Restricted Project, Restricted Project

May 15 2022

dim abandoned D123427: Reset _unwindInfoMissing when info is found eventually.
May 15 2022, 12:47 AM · Restricted Project, Restricted Project, Restricted Project

May 12 2022

dim added a comment to rG0d8cb8b399ad: DWARFVerifier: Verify CU/TU index overlap issues.

Cross-reference: https://github.com/llvm/llvm-project/issues/55414

May 12 2022, 3:31 PM · Restricted Project, Restricted Project
dim updated subscribers of rG0d8cb8b399ad: DWARFVerifier: Verify CU/TU index overlap issues.

This fails to compile:

$ /usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/w/bld/org/lib/DebugInfo/DWARF -I/w/src/llvm.org/llvm/lib/DebugInfo/DWARF -I/w/bld/org/include -I/w/src/llvm.org/llvm/include -I/usr/local/include -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -c /w/src/llvm.org/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
In file included from /w/src/llvm.org/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:8:
In file included from /w/src/llvm.org/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h:12:
In file included from /w/src/llvm.org/llvm/include/llvm/ADT/Optional.h:19:
In file included from /w/src/llvm.org/llvm/include/llvm/ADT/Hashing.h:51:
In file included from /usr/include/c++/v1/algorithm:653:
In file included from /usr/include/c++/v1/functional:500:
In file included from /usr/include/c++/v1/__functional/function.h:20:
In file included from /usr/include/c++/v1/__memory/shared_ptr.h:22:
/usr/include/c++/v1/__memory/allocator.h:154:28: error: call to implicitly-deleted copy constructor of 'llvm::IntervalMap<unsigned int, unsigned long, 12>'
        ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
                           ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__memory/allocator_traits.h:290:13: note: in instantiation of function template specialization 'std::allocator<llvm::IntervalMap<unsigned int, unsigned long, 12>>::construct<llvm::IntervalMap<unsigned int, unsigned long, 12>, const llvm::IntervalMap<unsigned int, unsigned long, 12> &>' requested here
        __a.construct(__p, _VSTD::forward<_Args>(__args)...);
            ^
/usr/include/c++/v1/vector:1085:25: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<llvm::IntervalMap<unsigned int, unsigned long, 12>>>::construct<llvm::IntervalMap<unsigned int, unsigned long, 12>, const llvm::IntervalMap<unsigned int, unsigned long, 12> &, void>' requested here
        __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos), __x);
                        ^
/usr/include/c++/v1/vector:1178:9: note: in instantiation of member function 'std::vector<llvm::IntervalMap<unsigned int, unsigned long, 12>>::__construct_at_end' requested here
        __construct_at_end(__n, __x);
        ^
/w/src/llvm.org/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:410:48: note: in instantiation of member function 'std::vector<llvm::IntervalMap<unsigned int, unsigned long, 12>>::vector' requested here
  std::vector<IntervalMap<uint32_t, uint64_t>> Sections(
                                               ^
/w/src/llvm.org/llvm/include/llvm/ADT/IntervalMap.h:970:14: note: copy constructor of 'IntervalMap<unsigned int, unsigned long, 12>' is implicitly deleted because variant field 'leaf' has a non-trivial copy constructor
    RootLeaf leaf;
             ^
1 error generated.

What standard library is in use here? I believe it's non-conformant (& since lots of other buildbots haven't failed on this, that seems likely), possibly outdated.

LLVM requires C++14 and C++14 provides a std::vector constructor that takes a count (& not a default value) and default constructs the elements in-place without copying a singular default value.

May 12 2022, 1:25 AM · Restricted Project, Restricted Project

Apr 29 2022

dim committed rG7abfaa0a815a: [lldb] Define LLDB_VERSION_PATCH correctly (authored by dim).
[lldb] Define LLDB_VERSION_PATCH correctly
Apr 29 2022, 10:31 AM · Restricted Project, Restricted Project
dim closed D124672: [lldb] Define LLDB_VERSION_PATCH correctly.
Apr 29 2022, 10:31 AM · Restricted Project, Restricted Project, Restricted Project
dim updated the diff for D124672: [lldb] Define LLDB_VERSION_PATCH correctly.

Add llvm/utils/gn/secondary/lldb/include/lldb/Version/BUILD.gn while we're here.

Apr 29 2022, 10:29 AM · Restricted Project, Restricted Project, Restricted Project
dim requested review of D124672: [lldb] Define LLDB_VERSION_PATCH correctly.
Apr 29 2022, 6:25 AM · Restricted Project, Restricted Project, Restricted Project

Apr 8 2022

dim updated subscribers of D123427: Reset _unwindInfoMissing when info is found eventually.
Apr 8 2022, 4:01 PM · Restricted Project, Restricted Project, Restricted Project
dim accepted D122628: [libcxx] random_device, use arc4random() on FreeBSD, NetBSD and DragonFlyBSD.

Sure, LGTM.

Apr 8 2022, 4:01 PM · Restricted Project, Restricted Project
dim requested review of D123427: Reset _unwindInfoMissing when info is found eventually.
Apr 8 2022, 3:51 PM · Restricted Project, Restricted Project, Restricted Project