dim (Dimitry Andric)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 15 2014, 12:19 PM (183 w, 3 d)

Recent Activity

Mon, Sep 25

dim added a comment to D37415: Add gtest include directories before system include directories on FreeBSD and DragonFlyBSD.

It is a FreeBSD-ism: non-system libraries and their headers go into /usr/local, which is not on default search paths. But there might be a more elegant way to do it, I will take a look.

That I understand. I'm just surprised the libxml stuff doesn't end up in /usr/local/include/libxml2/libxml/*.h and people need to explicitely state -I /usr/local/include/libxml2 (or rather pkg-config --cflags libxml2). Or is the comment not up-to-date and this the /usr/local/include is needed for something else than libxml2?

Mon, Sep 25, 2:30 PM

Aug 25 2017

dim added a comment to D6379: Only warn about DWARF2 supporting one section per compilation unit for code sections.

Actually I see that we also get this warning on our .section ".note.GNU-stack","",@progbits directives, which are in most of our hand-written .S files. Since the type of that section is progbits, this fix won't work for it.

Aug 25 2017, 2:03 PM
dim added a comment to D6379: Only warn about DWARF2 supporting one section per compilation unit for code sections.

Should we add that filter elsewhere rather than here? (eg: we shouldn't be adding such non-text sections into the Sections map if they're not part of teh DWARF anyway, right?)

Aug 25 2017, 12:25 PM
dim added a reviewer for D6379: Only warn about DWARF2 supporting one section per compilation unit for code sections: emaste.

Pinging, since it has come up again on the FreeBSD mailing lists, now this warning is emitted thousands of times. Adding Ed as a reviewer.

Aug 25 2017, 11:56 AM

Aug 12 2017

dim added a comment to D36388: [X86][SandyBridge] Additional updates to the SNB instructions scheduling information .

@dim What effect does this patch have on PR34080? The changes in pr34080.ll aren't looking hopeful

Aug 12 2017, 12:52 PM

Jul 28 2017

dim added a comment to D33900: Print registered targets in clang's version information.

dim: Does putting the target listing behind a different flag work for you? Which problem are you trying to solve here?

Jul 28 2017, 10:36 AM

Jul 24 2017

dim added a comment to D33900: Print registered targets in clang's version information.

Also note that it is only added to the --version output, not the -v output (the former is really a "verbose" version of the latter):

$ clang -v
clang version 5.0.0 (trunk 308421)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /share/dim/llvm/308421-trunk-freebsd12-amd64-ninja-rel-1/bin
Jul 24 2017, 12:06 PM
dim added a comment to D33900: Print registered targets in clang's version information.

Sorry, I just noticed this weeks later. Why are we adding this to --version instead of adding some new flag for printing this? When I pass --version, I'm usually interested in clang's version and don't need a screenful of other information below it (which makes the output I do care about scroll off the screen).

Jul 24 2017, 12:04 PM

Jul 19 2017

dim added a comment to D35034: compiler-rt: use fp_t instead of long double, for consistency.

Yep, LGTM. That would hopefully also allow this to build with recent versions of gcc without warnings.

Jul 19 2017, 3:59 AM

Jul 18 2017

dim added a comment to D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

I went for using GetSystemInfo() on Windows, pagesize() everywhere else, in the end. I think that is the most complete version. I'm keeping an eye on the build bots, if anything strange happens, I will revert it ASAP.

Jul 18 2017, 1:33 PM
dim committed rL308355: For KMP_PAGE_SIZE, use getpagesize() on Unix, GetSystemInfo() on Windows.
For KMP_PAGE_SIZE, use getpagesize() on Unix, GetSystemInfo() on Windows
Jul 18 2017, 1:32 PM
dim closed D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix by committing rL308355: For KMP_PAGE_SIZE, use getpagesize() on Unix, GetSystemInfo() on Windows.
Jul 18 2017, 1:32 PM

Jul 17 2017

dim added a comment to rL307364: [ELF] - Handle symbols with default version early..

Submitted https://bugs.llvm.org/show_bug.cgi?id=33820

Jul 17 2017, 10:47 AM

Jul 15 2017

dim updated subscribers of rL307364: [ELF] - Handle symbols with default version early..

This commit causes link failures on FreeBSD/AArch64, where it apparently messes something up in libc.so.7's symbols, and executables can't link against it anymore, because of 'undefined' symbols. (I haven't seen problems yet on X86.)

Jul 15 2017, 2:21 PM
dim added a comment to rL307100: Move clearOutputSections earlier. NFC..

So for some reason, the OutputSectionCommand *Cmd = findSectionCommand(".ARM.exidx"); line earlier in that function results in a valid OutputSectionCommand object, but with a null Sec member.

Jul 15 2017, 8:44 AM
dim updated subscribers of rL307100: Move clearOutputSections earlier. NFC..

This commit causes segfaults when linking the FreeBSD GENERIC kernel for aarch64:

(gdb) run
Starting program: /home/dim/obj/llvm-trunk-r307100/bin/ld.lld -m aarch64elf -Bdynamic -T /home/dim/src/clang500-import/sys/conf/ldscript.arm64 --build-id=sha1 --no-warn-mismatch --warn-common --export-dynamic --dynamic-linker /red/herring -o kernel.full -X locore.o cam.o cam_compat.o cam_iosched.o cam_periph.o cam_queue.o cam_sim.o c [... lots of objects ...] config.o env.o hints.o vnode_if.o hack.pico vers.o
[New LWP 100238 of process 41586]
[New LWP 100249 of process 41586]
[New LWP 100257 of process 41586]
[New LWP 100264 of process 41586]
[New LWP 100269 of process 41586]
[New LWP 100288 of process 41586]
[New LWP 100296 of process 41586]
[New LWP 100297 of process 41586]
[New LWP 100301 of process 41586]
[New LWP 100302 of process 41586]
[New LWP 100309 of process 41586]
[New LWP 100323 of process 41586]
[New LWP 100333 of process 41586]
[New LWP 100359 of process 41586]
[New LWP 100363 of process 41586]
[New LWP 100375 of process 41586]
[New LWP 100393 of process 41586]
[New LWP 100413 of process 41586]
[New LWP 100424 of process 41586]
[New LWP 100434 of process 41586]
[New LWP 100464 of process 41586]
[New LWP 100474 of process 41586]
[New LWP 100842 of process 41586]
[New LWP 101856 of process 41586]
[New LWP 101859 of process 41586]
[New LWP 101861 of process 41586]
[New LWP 101865 of process 41586]
[New LWP 101867 of process 41586]
[New LWP 101871 of process 41586]
[New LWP 101875 of process 41586]
[New LWP 101884 of process 41586]
[New LWP 101887 of process 41586]
Jul 15 2017, 8:04 AM

Jul 14 2017

dim committed rL308052: Fix mixed line terminators. NFC..
Fix mixed line terminators. NFC.
Jul 14 2017, 2:15 PM

Jul 11 2017

dim added a comment to D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

Pinging this again. Should we go for this minimal change, or do we want the GetSystemInfo call? :)

Jul 11 2017, 11:48 AM
dim committed rL307680: Rename z_Linux_asm.s to z_Linux_asm.S.
Rename z_Linux_asm.s to z_Linux_asm.S
Jul 11 2017, 11:05 AM
dim closed D35171: Rename z_Linux_asm.s to z_Linux_asm.S.
Jul 11 2017, 11:05 AM

Jul 9 2017

dim committed rL307474: Add a .arcconfig file for openmp..
Add a .arcconfig file for openmp.
Jul 9 2017, 6:20 AM
dim created D35171: Rename z_Linux_asm.s to z_Linux_asm.S.
Jul 9 2017, 6:13 AM
dim updated the diff for D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

Minimized changes:

  • Rename PAGE_SIZE macro to KMP_PAGE_SIZE
  • Remove untested Windows code and revert to just returning KMP_PAGE_SIZE
  • For all other OSes, return getpagesize()
Jul 9 2017, 6:13 AM
dim added a comment to D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

OK, thanks, I agree system macros should not be re-defined.

Then, maybe rename it into non-system one, like KMP_PAGE_SIZE? I am just scared that a lot of platforms need testing because of so little change, while there should be a way to avoid the testing, I think.

Jul 9 2017, 6:13 AM

Jul 6 2017

dim added a comment to D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

Isn't it safer to just put the definition of PAGE_SIZE under "#ifndef PAGE_SIZE"?

This would not require to test all the platforms affected except Linux.

Jul 6 2017, 11:38 AM
dim updated the diff for D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

Move inclusion of windows.h a bit higher, and change SYSTEMINFO to SYSTEM_INFO.

Jul 6 2017, 11:11 AM
dim updated the diff for D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

Use getpagesize() on all platforms, and add a Windows implementation of it.

Jul 6 2017, 10:57 AM
dim updated subscribers of D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

Apparently KMP_OS_CNK is for Blue Gene/Q, which seems to be a Linux-like, maybe @hfinkel might know whether this OS supports getpagesize()? If so, the case can be simplified to providing a getpagesize() only for Windows, then defining KMP_GET_PAGE_SIZE() to getpagesize() unconditionally.

Jul 6 2017, 10:47 AM
dim added a comment to D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

Note the TODO case also covers KMP_OS_CNK, of which I have no idea what it is. So the 0x4000 case must stay in there anyway.

Jul 6 2017, 10:42 AM
dim added a comment to D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.

There's a comment indicating that we should find the correct function on Windows and use it, but in the description of this review you mention that you found it in the SYSTEM_INFO structure. So why not use it?

Jul 6 2017, 10:39 AM
dim created D35072: Stop defining `PAGE_SIZE`, and use `getpagesize()` on Unix.
Jul 6 2017, 10:32 AM

Jul 3 2017

dim accepted D34960: Enable LLVM asan support for NetBSD/amd64.

LGTM

Jul 3 2017, 1:21 PM · Restricted Project, Restricted Project

Jul 1 2017

dim added inline comments to rL306858: Completely disable git/svn version checking if not needed..
Jul 1 2017, 2:57 PM

Jun 30 2017

dim added a comment to rL297702: [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded.

This causes a regression, which I have reported in https://bugs.llvm.org/show_bug.cgi?id=33653.

Jun 30 2017, 4:41 AM

Jun 26 2017

dim committed rL306319: Only use libdl when it is available.
Only use libdl when it is available
Jun 26 2017, 12:17 PM
dim closed D34632: Check for libdl, and only use it when available by committing rL306319: Only use libdl when it is available.
Jun 26 2017, 12:16 PM
dim updated the diff for D34632: Check for libdl, and only use it when available.

Use CMAKE_DL_LIBS instead. This is in CMake since at least 2012, if not before.

Jun 26 2017, 11:01 AM
dim added a comment to D34632: Check for libdl, and only use it when available.

CMake has a variable CMAKE_DL_LIBS which I believe contains the information you want. It essentially gets defined to "-ldl" on unices that need it and "" on platforms which don't need it.

Jun 26 2017, 10:55 AM
dim created D34632: Check for libdl, and only use it when available.
Jun 26 2017, 10:32 AM

Jun 7 2017

dim committed rL304899: Only print registered targets for `--version`.
Only print registered targets for `--version`
Jun 7 2017, 5:06 AM
dim closed D33981: Only print registered targets for `--version` by committing rL304899: Only print registered targets for `--version`.
Jun 7 2017, 5:06 AM
dim closed D33981: Only print registered targets for `--version`.
Jun 7 2017, 5:06 AM
dim created D33981: Only print registered targets for `--version`.
Jun 7 2017, 4:23 AM

Jun 6 2017

dim committed rL304837: Adjust SetVersionPrinter call for D33899.
Adjust SetVersionPrinter call for D33899
Jun 6 2017, 2:55 PM
dim closed D33959: Adjust SetVersionPrinter call for D33899 by committing rL304837: Adjust SetVersionPrinter call for D33899.
Jun 6 2017, 2:55 PM
dim committed rL304836: Print registered targets in clang's version information.
Print registered targets in clang's version information
Jun 6 2017, 2:54 PM
dim closed D33900: Print registered targets in clang's version information.
Jun 6 2017, 2:54 PM
dim committed rL304835: Allow VersionPrinter to print to arbitrary raw_ostreams.
Allow VersionPrinter to print to arbitrary raw_ostreams
Jun 6 2017, 2:54 PM
dim closed D33899: Allow VersionPrinter to print to arbitrary raw_ostreams.
Jun 6 2017, 2:54 PM
dim created D33959: Adjust SetVersionPrinter call for D33899.
Jun 6 2017, 2:18 PM
dim updated the diff for D33899: Allow VersionPrinter to print to arbitrary raw_ostreams.

Use a std::function object instead of a plain function pointer.

Jun 6 2017, 2:14 PM
dim added inline comments to D33899: Allow VersionPrinter to print to arbitrary raw_ostreams.
Jun 6 2017, 1:25 PM
dim added a comment to D33899: Allow VersionPrinter to print to arbitrary raw_ostreams.

Alternatively, as a lower impact change, I could just add the code from printRegisteredTargetsForVersion to tools/clang/lib/Driver/Driver.cpp, but it's a little ugly...

Jun 6 2017, 12:42 PM
dim added inline comments to D33899: Allow VersionPrinter to print to arbitrary raw_ostreams.
Jun 6 2017, 12:21 PM

Jun 5 2017

dim created D33900: Print registered targets in clang's version information.
Jun 5 2017, 9:54 AM
dim created D33899: Allow VersionPrinter to print to arbitrary raw_ostreams.
Jun 5 2017, 9:48 AM
dim committed rL304714: Remove duplicate LLVM_NATIVE_ from llvm's config.h.
Remove duplicate LLVM_NATIVE_ from llvm's config.h
Jun 5 2017, 6:53 AM
dim closed D33881: Remove duplicate LLVM_NATIVE_ from llvm's config.h by committing rL304714: Remove duplicate LLVM_NATIVE_ from llvm's config.h.
Jun 5 2017, 6:53 AM
dim committed rL304707: Fix building DynamicLibrary.cpp with musl libc.
Fix building DynamicLibrary.cpp with musl libc
Jun 5 2017, 4:22 AM
dim closed D33883: Fix building DynamicLibrary.cpp with musl libc by committing rL304707: Fix building DynamicLibrary.cpp with musl libc.
Jun 5 2017, 4:22 AM

Jun 4 2017

dim created D33883: Fix building DynamicLibrary.cpp with musl libc.
Jun 4 2017, 1:37 PM
dim created D33881: Remove duplicate LLVM_NATIVE_ from llvm's config.h.
Jun 4 2017, 12:22 PM

Jun 3 2017

dim added a comment to D33600: Adjust sanitizers for FreeBSD 64-bit inode update.

Why does this code live in a Linux file? Are there plans to split it out, rename?

Jun 3 2017, 4:47 AM
dim committed rL304658: Adjust sanitizers for FreeBSD 64-bit inode update.
Adjust sanitizers for FreeBSD 64-bit inode update
Jun 3 2017, 4:12 AM
dim closed D33600: Adjust sanitizers for FreeBSD 64-bit inode update by committing rL304658: Adjust sanitizers for FreeBSD 64-bit inode update.
Jun 3 2017, 4:12 AM

Jun 1 2017

dim added a comment to D33600: Adjust sanitizers for FreeBSD 64-bit inode update.

Ping.

Jun 1 2017, 12:36 PM

May 30 2017

dim updated subscribers of rL303763: [LV] Update type in cost model for scalarization.

Note that this commit can cause the following failure, as @joerg also found out:

Unhandled cast
UNREACHABLE executed at include/llvm/CodeGen/BasicTTIImpl.h:590!

Minimized test case:

/* clang -cc1 -triple x86_64 -S -O2 -vectorize-loops -vectorize-slp testcase-r303763.c */
char a[1];
long b;
unsigned c;
void d(void);
void d() {
  for (; c < b; c++)
    if (a[c])
      a[c] = ',';
}
May 30 2017, 3:48 AM

May 27 2017

dim added a comment to D32172: Port asan to FreeBSD AArch64.

With that last patch, I get the following test results, which are not greatly different from those on x86:

May 27 2017, 9:33 AM
dim added a comment to D32172: Port asan to FreeBSD AArch64.

Actually the <sys/exec.h> header is still needed for the ps_string usage later in the file, so the diff becomes:

--- lib/sanitizer_common/sanitizer_linux.cc     (revision 303869)
+++ lib/sanitizer_common/sanitizer_linux.cc     (working copy)
@@ -62,8 +62,6 @@
 #if SANITIZER_FREEBSD
 #include <sys/exec.h>
 #include <sys/sysctl.h>
-#include <vm/vm_param.h>
-#include <vm/pmap.h>
 #include <machine/atomic.h>
 extern "C" {
 // <sys/umtx.h> must be included after <errno.h> and <sys/types.h> on
May 27 2017, 7:16 AM
dim added a comment to D32172: Port asan to FreeBSD AArch64.

It turns out I added the <vm/pmap.h> inclusion in rL263157, but it and the two other headers are not needed anymore, as the following diff at least makes it compile:

--- lib/sanitizer_common/sanitizer_linux.cc     (revision 303869)
+++ lib/sanitizer_common/sanitizer_linux.cc     (working copy)
@@ -60,10 +60,7 @@
 #include <unistd.h>
May 27 2017, 7:13 AM
dim added a comment to D32172: Port asan to FreeBSD AArch64.

Unfortunately it does not yet compile on FreeBSD 12/arm64, as there is a problem with the system header <machine/pmap.h>:

In file included from /home/dim/src/llvm-trunk/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc:66:
In file included from /usr/include/vm/pmap.h:90:
/usr/include/machine/pmap.h:57:28: error: unknown type name 'vm_page_t'
void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma);
                           ^
/usr/include/machine/pmap.h:57:41: error: unknown type name 'vm_memattr_t'
void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma);
                                        ^
/usr/include/machine/pmap.h:66:2: error: unknown type name 'vm_memattr_t'
        vm_memattr_t            pv_memattr;
        ^
3 errors generated.

I've now tried commenting out the inclusion of <vm/pmap.h>, to side-step the issue. It's still building...

May 27 2017, 6:51 AM

May 26 2017

dim added a comment to D33600: Adjust sanitizers for FreeBSD 64-bit inode update.

Do we have public build bot for FreeBSD?

May 26 2017, 3:40 PM
dim updated the diff for D33600: Adjust sanitizers for FreeBSD 64-bit inode update.

I accidentally left a debugging aid in place. Remove it.

May 26 2017, 11:06 AM
dim created D33600: Adjust sanitizers for FreeBSD 64-bit inode update.
May 26 2017, 11:04 AM
dim accepted D30538: Add documentation for -fno-strict-aliasing.

LGTM, though it would be nice if we implemented gcc's extension for this at some point... ;)

May 26 2017, 10:48 AM

May 25 2017

dim committed rL303943: Return a lit.Test.Result object from TestRunner's executeShTest().
Return a lit.Test.Result object from TestRunner's executeShTest()
May 25 2017, 4:57 PM
dim closed D33579: Return a lit.Test.Result object from TestRunner's executeShTest() by committing rL303943: Return a lit.Test.Result object from TestRunner's executeShTest().
May 25 2017, 4:57 PM
dim created D33579: Return a lit.Test.Result object from TestRunner's executeShTest().
May 25 2017, 4:52 PM
dim committed rL303866: Add generic __bswap[ds]i2 implementations.
Add generic __bswap[ds]i2 implementations
May 25 2017, 7:52 AM
dim closed D33516: Add generic __bswap[ds]i2 implementations.
May 25 2017, 7:52 AM
dim added a comment to D33516: Add generic __bswap[ds]i2 implementations.

Hmm, it's a bit weird that lib/builtins doesn't have its own .clang-format file. Is this supposed to have LLVM or Google style? The style across various files seems to be wildly different.

May 25 2017, 7:36 AM

May 24 2017

dim created D33516: Add generic __bswap[ds]i2 implementations.
May 24 2017, 1:33 PM

May 19 2017

dim added a comment to D32271: Patch to Attach pid successfully from different dir.

As I found out in rL303015, the KERN_PROC_PATHNAME has one drawback: if an executable file has multiple hard links, you will get just one of its filenames as the result. Since that filename is more or less randomly chosen, it does *not* have to correspond to the actual argv[0] the executable was invoked with. If that does not matter, this approach is fine, though.

May 19 2017, 6:05 AM

May 17 2017

dim committed rL303289: Reapply part of rL303015, fixing just the DynamicLibaryTest. Add.
Reapply part of rL303015, fixing just the DynamicLibaryTest. Add
May 17 2017, 1:00 PM
dim committed rL303285: Revert r303015, because it has the unintended side effect of breaking.
Revert r303015, because it has the unintended side effect of breaking
May 17 2017, 12:46 PM

May 14 2017

dim added inline comments to rL299061: [sanitizer] Move fread and fwrite interceptors to sanitizer_common.
May 14 2017, 12:39 PM
dim updated subscribers of rL297665: [asan] Split SIGSEGV / SIGBUS handling so we can handle only one of them and….
May 14 2017, 12:28 PM
dim committed rL303015: Fix DynamicLibraryTest.cpp on FreeBSD and NetBSD.
Fix DynamicLibraryTest.cpp on FreeBSD and NetBSD
May 14 2017, 11:49 AM
dim closed D33171: Fix DynamicLibraryTest.cpp on FreeBSD by committing rL303015: Fix DynamicLibraryTest.cpp on FreeBSD and NetBSD.
May 14 2017, 11:49 AM
dim updated the diff for D33171: Fix DynamicLibraryTest.cpp on FreeBSD.
  • Move sys/sysctl.h include to a separate block, specifically for (Free|Net)BSD
  • Remove NetBSD from several #if statements
  • Use correct mib for NetBSD to retrieve process pathname
May 14 2017, 8:04 AM
dim added inline comments to D33171: Fix DynamicLibraryTest.cpp on FreeBSD.
May 14 2017, 7:16 AM
dim updated the summary of D33171: Fix DynamicLibraryTest.cpp on FreeBSD.
May 14 2017, 7:02 AM
dim created D33171: Fix DynamicLibraryTest.cpp on FreeBSD.
May 14 2017, 7:01 AM

May 6 2017

dim committed rL302362: Ensure showbase does not overflow do_put buffers.
Ensure showbase does not overflow do_put buffers
May 6 2017, 2:12 PM
dim closed D32670: Ensure showbase does not overflow do_put buffers.
May 6 2017, 2:11 PM

May 3 2017

dim added a comment to D32670: Ensure showbase does not overflow do_put buffers.

Ping :)

May 3 2017, 3:58 AM

Apr 29 2017

dim committed rL301760: Include <cstdio> in PrettyStackTrace.cpp, since it uses vsnprintf(3)..
Include <cstdio> in PrettyStackTrace.cpp, since it uses vsnprintf(3).
Apr 29 2017, 4:58 PM
dim updated the diff for D32670: Ensure showbase does not overflow do_put buffers.

Simplify test case a bit.

Apr 29 2017, 2:06 PM
dim added a comment to D32670: Ensure showbase does not overflow do_put buffers.

Note: I copied some of the test case from rL227097, which had a similar case of a too short buffer.

Apr 29 2017, 7:20 AM
dim created D32670: Ensure showbase does not overflow do_put buffers.
Apr 29 2017, 7:17 AM