joerg (Joerg Sonnenberger)
User

Projects

User Details

User Since
Nov 23 2012, 10:16 AM (230 w, 3 d)

Recent Activity

Yesterday

joerg added inline comments to D32450: [libunwind] Add 64-bit SPARC support.
Mon, Apr 24, 5:58 PM
joerg added a comment to D32450: [libunwind] Add 64-bit SPARC support.

You are missing the first loop in https://nxr.netbsd.org/xref/src/sys/lib/libunwind/DwarfParser.hpp#489

Mon, Apr 24, 3:38 PM
joerg added a comment to D32427: Fix float abi for SUSE ARM triples.

I'm not sure the results will really work that well either.

Mon, Apr 24, 6:06 AM

Sat, Apr 22

joerg added a comment to D32120: Don't test setting sticky bits on files for (Free|Open)BSD.

I think a better idea would be to just allow this tests to fail with EPERM.

Sat, Apr 22, 12:09 PM
joerg added a comment to D32141: docs: Explain how to generate a compilation database for Qt projects.

The change itself sounds fine, but the referenced documentation can likely be improved, i.e. searching for "qbs compilation database" or even "clangdb" doesn't trigger any hits here.

Sat, Apr 22, 7:30 AM

Thu, Apr 20

joerg added a comment to D6052: Avoid short relocation in x86_64 large code model.

My point remains.

Thu, Apr 20, 3:43 PM

Sun, Apr 16

joerg added a comment to D31992: [clangd] Escape only necessary characters in JSON output.

We already have a couple of case that expect the encoding to be compatible. I'm not very attached to the additional special cases from YAML, but having either a common escape function OR a JSON escape in LLVM/Support is quite important.

Sun, Apr 16, 1:24 PM · Restricted Project
joerg added a comment to D31992: [clangd] Escape only necessary characters in JSON output.

Just to avoid any confusion: this should be the generic YAML escape routine in llvm/lib/Support, i.e. IMO we don't want to have separate YAML and JSON escape routines.
Effective, change YAMLParser.cpp line 697 to use \u and drop the whole UTF-8 handling part.

Sun, Apr 16, 1:01 PM · Restricted Project
joerg added a comment to D31992: [clangd] Escape only necessary characters in JSON output.

The short version is perfectly fine as long as works for both JSON and YAML. Less output is always good :)

Sun, Apr 16, 12:42 PM · Restricted Project

Thu, Apr 13

joerg added a comment to D31992: [clangd] Escape only necessary characters in JSON output.

If I understand correctly, that's " and \ for JSON and ", \ and all non-printable characters (which unfortunately requires understanding of unicode to solve this fully correctly) in YAML.

Thu, Apr 13, 12:16 PM · Restricted Project
joerg added a comment to D31992: [clangd] Escape only necessary characters in JSON output.

I'm strongly against this patch. Can you give an actual test case for the problematic behavior?

Thu, Apr 13, 6:28 AM · Restricted Project

Tue, Apr 4

joerg added a comment to D31573: [Builtins] Fix test cases for xf/ti.

Actually, there are three platforms that use: i386, amd64 and m68k. The latter might not currently be supported by LLVM, but it still exists.
__int64_t and therefore CRT_HAS_128BIT are supported by all 64bit platforms and only those. The two features are orthogonal.

Tue, Apr 4, 4:32 AM

Mon, Apr 3

joerg added a comment to D31573: [Builtins] Fix test cases for xf/ti.

Please do not drop checks for CRT_HAS_128BIT -- the code requirse__ int128_t and doesn't work on platforms without.

Mon, Apr 3, 1:32 PM

Sun, Apr 2

joerg added a comment to D31573: [Builtins] Fix test cases for xf/ti.

That would be perfectly reasonable. Some other places already tag it with HAS_80_BIT_LONG_DOUBLE, but I don't know what is responsible for setting that macro.

Sun, Apr 2, 5:22 AM
joerg added a comment to D31573: [Builtins] Fix test cases for xf/ti.

This doesn't make sense to me. XF *is* for modes with Intel extended precision. IEEE 128bit floats should be TF.

Sun, Apr 2, 1:21 AM

Fri, Mar 31

joerg closed D31533: Do not translate rint into nearbyint, but truncate it like nearbyint.

r299247.

Fri, Mar 31, 1:10 PM
joerg committed rL299247: Do not translate rint into nearbyint, but truncate it like nearbyint..
Do not translate rint into nearbyint, but truncate it like nearbyint.
Fri, Mar 31, 1:10 PM
joerg created D31533: Do not translate rint into nearbyint, but truncate it like nearbyint.
Fri, Mar 31, 6:52 AM

Mar 25 2017

joerg committed rL298799: Split the SimplifyCFG pass into two variants..
Split the SimplifyCFG pass into two variants.
Mar 25 2017, 11:56 PM
joerg closed D30333: Split SimplifyCFG to run obscuring switch transforms only during last phase by committing rL298799: Split the SimplifyCFG pass into two variants..
Mar 25 2017, 11:56 PM
joerg accepted D31367: Expression: add missing linkage to RuntimeDyld component.
Mar 25 2017, 11:53 AM · Restricted Project
joerg accepted D31369: PluginUnwindAssemblyX86: add missing linkage to MCDisasm.
Mar 25 2017, 11:53 AM · Restricted Project

Mar 20 2017

joerg added inline comments to D23770: [AAP] (4) Add AAP basic tablegen (InstrInfo, RegInfo).
Mar 20 2017, 4:23 AM

Mar 19 2017

joerg added a comment to D30974: [CompilationDatabase] remove duplicate elements.

Personally, I think this should have been handled by whatever tool created the JSON database file in first place.

Mar 19 2017, 4:49 AM

Mar 18 2017

joerg added a comment to D31085: [InlineCost] Increase the cost of Switch.

Can you please also try this on top of the changes from D30333? That's changing one switch transformation to happen much later, making it more sensitive to inline cost estimates.

Mar 18 2017, 5:44 AM

Mar 13 2017

joerg added a comment to D30886: [ELF] Pad x86 executable sections with 0xcc int3 instructions.

Does this have any impact on compressibility of executables? E.g. gzip or xz.

Mar 13 2017, 6:06 AM
joerg added a comment to D30699: [ELF] - Stop producing broken output for R_386_GOT32X relocation..

Statically linked binaries don't normally have a GOT, but should synthesize an entry in .data for it. Chances are that is exactly the problem you are seeing?

Mar 13 2017, 4:34 AM

Mar 11 2017

joerg added a comment to D30733: [Driver] Add arch-specific rpath for libc++.

Installing libc++ along clang makes a lot of sense for non-system compilers. It doesn't imply any version locking like in GCC, i.e. you are still free to install whatever version of libunwind and libc++ you want. I'm somewhat conflicted about this patch. I think it is an actual improvement for some deployment cases, but I also consider it a bit of an abuse of the ressource directory. I'm not sure we have a better mechanism at hand right now though.

Mar 11 2017, 12:26 AM
joerg added a comment to D30699: [ELF] - Stop producing broken output for R_386_GOT32X relocation..

Are we talking about statically or dynamically linked programs? It makes a different for the former, but shouldn't for the latter.

Mar 11 2017, 12:06 AM

Mar 10 2017

joerg updated the diff for D30333: Split SimplifyCFG to run obscuring switch transforms only during last phase.

Add comments on why the split pass is useful.

Mar 10 2017, 10:36 PM
joerg added inline comments to D30333: Split SimplifyCFG to run obscuring switch transforms only during last phase.
Mar 10 2017, 10:34 PM

Mar 9 2017

joerg added inline comments to D30333: Split SimplifyCFG to run obscuring switch transforms only during last phase.
Mar 9 2017, 11:01 PM
joerg updated the diff for D30333: Split SimplifyCFG to run obscuring switch transforms only during last phase.

Move the full version out of the function simplification set into the late optimisation steps after all function inlining is done.

Mar 9 2017, 10:12 PM

Mar 5 2017

joerg added a comment to D30566: [ELF] - Do not try to create .eh_frame_hdr for relocatable output..

I'm not sure that clang should care at all about relocatable output, it is too much of a special case. IMO if you want to link relocatable output, you should call the linker directly.

Mar 5 2017, 4:42 AM

Mar 4 2017

joerg added inline comments to D30333: Split SimplifyCFG to run obscuring switch transforms only during last phase.
Mar 4 2017, 5:33 AM

Feb 24 2017

joerg added a comment to D30333: Split SimplifyCFG to run obscuring switch transforms only during last phase.

LNT run with this version shows a consistent 1%-2% improvement in both compile and execution time for many instances. One execution time regression remains.

Feb 24 2017, 1:52 PM
joerg created D30333: Split SimplifyCFG to run obscuring switch transforms only during last phase.
Feb 24 2017, 5:17 AM

Feb 16 2017

joerg added a comment to D30025: [compiler-rt] [builtins] Fix building atomic.c with GCC.

Note that the normal compiler-rt functions have a different name than the builtins they provide, at least from the C frontend view.

Feb 16 2017, 6:22 AM

Feb 15 2017

joerg added a comment to D29032: [mips] Define macros related to -mabicalls in the preprocessor.

No need to preserve the BSD behavior for NetBSD.

Feb 15 2017, 6:24 AM

Feb 11 2017

joerg requested changes to D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility.
Feb 11 2017, 1:28 PM

Feb 10 2017

joerg added a comment to D28543: Eliminates uninitialized warning for volatile variables..

Please fix the spelling errors in the titel / summary before commit.

Feb 10 2017, 2:41 PM

Feb 9 2017

joerg committed rL294585: Use protected name for the prototype arguments..
Use protected name for the prototype arguments.
Feb 9 2017, 6:24 AM

Feb 8 2017

joerg requested changes to D28791: [compiler-rt][crt] Simple crtbegin and crtend implementation.

You are wrong on (1), (2) and (3). But I am tired of this discussion. My objection stands. This is not a functional implementation for anything but a very narrow focus. There are much more complete implementations around. This creates more problems than it solves.

Feb 8 2017, 3:35 PM
joerg accepted D29630: [libcxx] Threading support: externalize sleep_for().

One small issue left, otherwise LGTM.

Feb 8 2017, 2:35 PM
joerg added a comment to D28791: [compiler-rt][crt] Simple crtbegin and crtend implementation.

So only Fuchsia would be supported, Linux would still need external ctrbegin.o/crtend.o (from gcc by default, but for projects like https://blogs.gentoo.org/gsoc2016-native-clang/ there still won't be any good solution).

Btw, do you have a crtfastmath.o on Fuchsia ? It's optionnal for clang, but if it is missing performance could be slower than Linux for programs using -ffast-math.

Feb 8 2017, 5:28 AM

Feb 7 2017

joerg added inline comments to D29630: [libcxx] Threading support: externalize sleep_for().
Feb 7 2017, 6:05 AM

Feb 6 2017

joerg added a comment to D29542: [TargetInfo] Adjust x86-32 atomic support to the CPU used.

Generic should imply i486+. I don't think any general purpose system supports i386 at this point, simply because it has an annoying number of bugs in critical components. The i486 (esp. the non-crippled ones) are reasonable easy to support and there are still people around with hardware, esp. clones.

Feb 6 2017, 9:55 AM
joerg added a comment to D29542: [TargetInfo] Adjust x86-32 atomic support to the CPU used.

At this point, I don't think there is any use on pretending that i386-as-default makes sense. So I would request that the i386 case should be made explicit or just dropped, with a preference for the latter.

Feb 6 2017, 8:55 AM

Feb 2 2017

joerg added a comment to D28190: [LVI] Switch from BFS to DFS exploration strategy.

I have one case in pkgsrc (gmic) which currently hits the 2GB VA limit for build processes. Taking the problematic example and comparing before/after on Linux I get:
before: 1.9GB max RSS
after: 0.9GB max RSS

Feb 2 2017, 1:54 PM
joerg added a comment to D20561: Warn when taking address of packed member.

Yes, the project is interested on reducing the number of false positives. The example you gave is *not* a FP, but exactly the kind of situation the warning is supposed to trigger on.

Feb 2 2017, 11:07 AM

Feb 1 2017

joerg added a comment to D20561: Warn when taking address of packed member.

The last review left out the case of naturally aligned packed members, IIRC. I have to go over the warning list in NetBSD again, but I'm moderately sure it is not fixed.

Feb 1 2017, 1:30 PM
joerg added a comment to D28791: [compiler-rt][crt] Simple crtbegin and crtend implementation.

It is functional only if a number of number of run time choices are made in the right way. That's exactly the reason why I am against shipping those files in first place: if you pick the wrong, you get a nicely linking binary that is magically broken much much later.

Feb 1 2017, 1:23 PM
joerg added a comment to D28791: [compiler-rt][crt] Simple crtbegin and crtend implementation.

I still say the patch in this form is doing a lot more harm than good. Without a functional version of crtbegin.c/crtend.o, I absolutely object to this change.

Feb 1 2017, 12:42 PM
joerg added a comment to D20561: Warn when taking address of packed member.

It is not true that all false positives have been fixed, some of the more complex cases involving nested data structures are still open.

Feb 1 2017, 5:14 AM

Jan 31 2017

joerg added a comment to D29042: Fix LLDB Android AArch64 gcc debug info build .

Yeah, switching the branches can be done separately. That's fine. Otherwise, this is starting to look like a proper simplification, so thumbs up.

Jan 31 2017, 6:51 AM

Jan 30 2017

joerg added a comment to D29256: Do not pass non-POD type variables through variadic function.

void f(std::string msg, ...) {

va_list ap;
va_start(ap, msg);

}

compiled against libc++ gives:
test.cc:6:3: error: cannot pass object of non-POD type 'std::string' (aka 'basic_string<char, char_traits<char>,
      allocator<char> >') through variadic function; call will abort at runtime [-Wnon-pod-varargs]
Jan 30 2017, 12:50 PM · Restricted Project
joerg accepted D29264: Add NetBSD support in Host::GetCurrentThreadID.
Jan 30 2017, 12:45 PM · Restricted Project
joerg added a comment to D29296: Make llvm::call_once more convenient to reuse out of LLVM.

If we want to make this namespace aware, I wonder if we shouldn't also be explicitly and use ::llvm::once_flag etc. But in general, LGTM.

Jan 30 2017, 12:33 PM

Jan 28 2017

joerg added a comment to D29256: Do not pass non-POD type variables through variadic function.

Should be "non-POD type" in the commit message.

Jan 28 2017, 4:24 PM · Restricted Project

Jan 24 2017

joerg added a comment to D28990: Align i128 to 16 bytes.

You make it sound as if the current alignment decision was made intentional. I strongly doubt that. So yes, please double check all the ABIs here to make sure that the wild card code is actually correct.

Jan 24 2017, 3:54 PM
joerg added a comment to D29032: [mips] Define macros related to -mabicalls in the preprocessor.

Always defining mips_abicalls is certainly the saner choice. I'm discussing with the NetBSD/MIPS guys whether we just want to go with it all the time and drop our custom changes for ABICALLS__. Chances are quite good that we are going in that direction.

Jan 24 2017, 2:54 PM
joerg added a comment to D29086: Restore visibility attribute for OpenBSD's stack guard.

Missing test case.

Jan 24 2017, 8:48 AM
joerg added a comment to D29042: Fix LLDB Android AArch64 gcc debug info build .

One more comment: the same check should be used in Path.inc line 183.

Jan 24 2017, 6:14 AM
joerg added a comment to D29042: Fix LLDB Android AArch64 gcc debug info build .

Two comments on this. First, I think we should invert the conditionals and prefer backtrace_symbols_fd.
That one will work in some situations where dladdr doesn't, e.g. if the main binary is not stripped but was linked without -rdynamic.

Jan 24 2017, 6:13 AM

Jan 23 2017

joerg added a comment to D29032: [mips] Define macros related to -mabicalls in the preprocessor.

I'm not terribly attached to using ABICALLS for NetBSD, but let me check back with some of the MIPS folks. I would prefer __mips_abicalls to be always defined though, independent of the historic behavior.

Jan 23 2017, 3:23 PM

Jan 22 2017

joerg added a comment to D28991: [lld] Use %u instead of %d for uint32_t formatting.

Neither is correct. It should be casted either to uintmax_t and printed with %ju or PRIu32 be used. The fancy new formatting system might also work of course, but won't give you a C string.
That said, this should also be changed to use snprintf...

Jan 22 2017, 12:59 PM · lld
joerg added a comment to D28990: Align i128 to 16 bytes.

What is the motivation behind requiring 128bit alignment? E.g. normal lowering of __uint128_t arithmetic on x86_64 will use uint64_t arithmetic and naturally require the same alignment.

Jan 22 2017, 12:57 PM
joerg added a comment to D28990: Align i128 to 16 bytes.

Why? At least for some x86 targets, this will unncessarily penalize the stack. Don't know all the other 32bit architectures, but many of those don't have a stack alignment larger than 32bit either.

Jan 22 2017, 9:46 AM

Jan 18 2017

joerg committed rL292453: Merging r292244:.
Merging r292244:
Jan 18 2017, 4:30 PM
joerg committed rL292451: Merging r292119:.
Merging r292119:
Jan 18 2017, 4:22 PM

Jan 17 2017

joerg added a comment to D28791: [compiler-rt][crt] Simple crtbegin and crtend implementation.

I fully agree that this doesn't belong into compiler-rt. Even then, it should at least be a working copy i.e. as found in NetBSD. This change is just adding a lot of complexity with negative net gain.

Jan 17 2017, 2:23 PM
joerg committed rL292244: Remove an overeager assert from r288844..
Remove an overeager assert from r288844.
Jan 17 2017, 11:40 AM

Jan 16 2017

joerg committed rL292119: Ensure that clang -pthread creates the right macro. -D_POSIX_THREADS.
Ensure that clang -pthread creates the right macro. -D_POSIX_THREADS
Jan 16 2017, 6:20 AM
joerg added a comment to D28639: [NDS32 2/46] Add NDS32 ELF defines.

yaml2obj can be used for all the tests that need an object file. Just make sure the output is understood by binutils on the first round.

Jan 16 2017, 2:02 AM

Jan 13 2017

joerg added a comment to D28639: [NDS32 2/46] Add NDS32 ELF defines.

Test cases?

Jan 13 2017, 4:14 AM
joerg added a comment to D28638: [NDS32 1/46] Recognise nds32 in triple parsing code.

Missing test case for endianess?

Jan 13 2017, 4:13 AM
joerg added a comment to D27654: Stop intercepting mallinfo and mallopt on FreeBSD.

Test case looks good now. Should the *.h definitions use GLIBC or at least LINUX_NOT_ANDROID too?

Jan 13 2017, 3:56 AM

Jan 12 2017

joerg committed rL291814: Add entry for -MJ..
Add entry for -MJ.
Jan 12 2017, 1:22 PM

Jan 11 2017

joerg added a comment to D27629: Fix unwind info relocation with large code model on AArch64.

About IR vs assembler: the test is in principle completely target neutral. Makes it easier to copy for other archs and our testing here is certainly on the weak side.

Jan 11 2017, 2:27 AM

Jan 10 2017

joerg added a comment to D27629: Fix unwind info relocation with large code model on AArch64.

I would expect an IR test for this, but at the very least, the tests should be in MC/ ?

Jan 10 2017, 3:23 PM
joerg added a comment to D27629: Fix unwind info relocation with large code model on AArch64.

Except you don't?

Jan 10 2017, 3:09 PM

Jan 9 2017

joerg committed rL291437: Use the same ABI logic for AArch64 Big Endian as in other places.
Use the same ABI logic for AArch64 Big Endian as in other places
Jan 9 2017, 3:51 AM
joerg committed rL291436: Extend NetBSD/AArch64 to cover Big Endian as well..
Extend NetBSD/AArch64 to cover Big Endian as well.
Jan 9 2017, 3:33 AM

Jan 8 2017

joerg added inline comments to D27654: Stop intercepting mallinfo and mallopt on FreeBSD.
Jan 8 2017, 10:07 AM
joerg added inline comments to D27654: Stop intercepting mallinfo and mallopt on FreeBSD.
Jan 8 2017, 9:02 AM

Jan 7 2017

joerg added a comment to D27629: Fix unwind info relocation with large code model on AArch64.

The MC part is fine. Can't comment on RuntimeDyld.

Jan 7 2017, 1:10 AM

Jan 5 2017

joerg committed rL291172: PR 31534: When emitting both DWARF unwind tables and debug information,.
PR 31534: When emitting both DWARF unwind tables and debug information,
Jan 5 2017, 1:06 PM
joerg committed rL291148: Typo.
Typo
Jan 5 2017, 10:10 AM
joerg committed rL291147: Typo.
Typo
Jan 5 2017, 10:10 AM

Jan 2 2017

joerg committed rL290817: Emit .cfi_sections before the first .cfi_startproc.
Emit .cfi_sections before the first .cfi_startproc
Jan 2 2017, 10:16 AM
joerg closed D28011: Emit .cfi_sections before the first .cfi_startproc by committing rL290817: Emit .cfi_sections before the first .cfi_startproc.
Jan 2 2017, 10:16 AM

Dec 27 2016

joerg added a comment to D27654: Stop intercepting mallinfo and mallopt on FreeBSD.

I'm not sure if any platform beside glibc supports mallinfo/mallopt.

Dec 27 2016, 4:15 PM

Dec 23 2016

joerg added a comment to D27522: [X86] Don't allow floating-point return types when SSE[12] is disabled.

There are two issues here. First of all, it is missing a test case. The second issue is that I somewhat don't like the local diagnose_fatal_error definition, I wonder if SDAG should provide such a helper in general.

Dec 23 2016, 1:11 PM

Dec 22 2016

joerg added a comment to D28047: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing..

There are two issues I have with the flags right now. The first one you are addressing with this patch. The second issue is they remain CC1-only flags. Can we introduce a proper "-emit-raw-llvm" flag to work like "-emit-llvm" but without the additional IR processing. We can make "-disable-llvm-optzns" an alias on the CC1-level for backwards compatibility. It is fine as a second step, but it would be nice to consider the big picture before shuffling things around.

Dec 22 2016, 3:35 AM

Dec 20 2016

joerg retitled D28011: Emit .cfi_sections before the first .cfi_startproc from to Emit .cfi_sections before the first .cfi_startproc.
Dec 20 2016, 6:02 PM

Dec 16 2016

joerg requested changes to D27860: [LLD] Remove assert from Relocations.h.
Dec 16 2016, 1:33 PM
joerg added a comment to D27860: [LLD] Remove assert from Relocations.h.

Depending on sanitizers to enforce constraints is bogus. They don't work everywhere. *sigh* Guess we have to cast it to int explicitly.

Dec 16 2016, 1:33 PM

Dec 14 2016

joerg abandoned D26326: Allow targets to override the use of getKindForGlobal in AsmPrinter to avoid text relocations on PPC64.

Superseded by PIC default for PPC64.

Dec 14 2016, 4:14 PM
joerg committed rL289744: Use PIC relocation mode by default for PowerPC64 ELF.
Use PIC relocation mode by default for PowerPC64 ELF
Dec 14 2016, 4:13 PM
joerg closed D26564: Use PIC relocation mode by default for PowerPC64 ELF by committing rL289744: Use PIC relocation mode by default for PowerPC64 ELF.
Dec 14 2016, 4:13 PM