User Details
- User Since
- Nov 23 2012, 10:16 AM (437 w, 5 d)
Wed, Apr 7
This sounds wrong. If you are using 'x86_64-freebsd' as triple and -m32, it should still call 'x86_64-freebsd-ld', but it is the responsibility of the driver to ensure that also the right set of linker flags are passed as well. Compare netbsd::Linker::ConstructJob for one way to handle this.
Wed, Mar 31
Tue, Mar 30
Yeah, I hit a compilation error somewhere depending on the include error. I forgot the details, this has been sitting around in my tree for while.
Mon, Mar 29
Sun, Mar 28
The NetBSD part looks ok, but also lacks proper testing. I'm not sure anyone but Linux cares at all otherwise as they lack 32bit SPARC support.
Mar 10 2021
Mar 8 2021
Mar 5 2021
That covers my case. I'm not completely happy with the need to rethrow, but the alternatives are much worse. It's a bit sad that we can't optimize it away, too.
Feb 18 2021
Feb 17 2021
Registers_arm64::jumpto in UnwindRegistersRestore.S.
Let me rephrase then. The restore code explicitly ends in "ret x30". It cannot set "pc" separate from "x30" in the current form. I'm not saying that the DWARF register shouldn't be supported, but this change doesn't do that.
I don't get this change. The restore code is literally returning by jumping to x30, so how is splitting PC and LR supposed to work?
Feb 8 2021
The test case needs to be resorted, so that the DOTEXPR test comes last, but otherwise this change works for me.
I have one concern about sparc-relocations.s, but that is not specific to the change at hand. IMO we should also have a variant of all the relocations with a fixed values of sym to test that the right bits are actually set. That would also make comparing the fixup handling easier e.g. to GNU as.
Feb 5 2021
I can't speak for other systems, but forcing libpthread to be linked is in general not desirable as it creates a non-trivial runtime cost, especially when <thread> is not used. That's still a pretty common use case of C++.
Feb 4 2021
The NetBSD part is most definitely not acceptable.
Jan 30 2021
First of all, I find this patch to be nearly impossible to read. It seems to mix a lot of refactoring with a functional change, making it very hard to focus on the core.
Jan 15 2021
It might be specific to the jump table case, but it should be instructional on how to do it. One important point is that it avoids inter-section relocations, which are a problem at least on MIPS.
Some targets already do this. Please check that you don't create regressions, especially on PowerPC.
Nov 30 2020
off_t is s signed type. Please fix the description.
Nov 23 2020
Do we really want to change the code here? It is perfectly well defined behavior.
Nov 19 2020
The difference is whether we promise to be instruction precise or not. I'm not sure we do or want to promise that as default.
I have no problem with the change, but please adjust the description to take about -funwind-tables. I don't think we do async by default, at least not by design.
Oct 29 2020
"It compiles with GCC" is not really helpful as argument because the observed behavior depends on a lot of internals. It is quite frankly impossible to be 100% identical to GCC's behavior. What LLVM guarantees is:
(1) Folding to false happens as late as reasonable possible. It happens most importantly after the first round of function and loop optimizations.
(2) Folding to true happens as part of constant folding etc as early as the condition is evaluated.
(3) The result is propagated to derived expression and those are folded recursively, including dead code elimination. This happens even for -O0.
Oct 28 2020
I completely agree with Roman that this patch is very undesirable since it has a high chance of breaking other reasonable uses of the intrinsic. In fact, I would say that the observed behavior here is perfectly reasonable under the definition of @lllvm.is.constant. The original code for LLVM at least should be just __builtin_constant_p(b) && b > -129 && b < 128).
Oct 27 2020
You can do an anon-mapping with size+pagesize in that case and map over it with MAP_FIXED.
Oct 15 2020
Disabling builtin handling when asm is enabled would be a major annoyance for NetBSD. The interaction between symbol renaming and TLI is complicated. There are cases where it would make perfect sense and others were it would be harmful. Example of the latter is the way SSP is implemented by inline functions that call a prototype renamed back to the original symbol name.
Sep 16 2020
I'm still curious about the source of the vptr diff, but that's a minor question, otherwise. LGTM
Sep 14 2020
I don't think this is the right place for this at all. Look at X86Subtarget::initSubtargetFeatures please.
Aug 25 2020
Can you change raw_fd_ostream::has_colors to memoize the result of FileDescriptorHasColors(FD) instead? That should give most of the performance gain without breaking the abstractions as much.
Aug 10 2020
This issue is on my long term TODO list. If there are no 64bit atomics, it is a really stupid idea to use them for timekeeping. I think for the use case of Timer, just splitting it into second and subsecond with explicit overflow handling is perfectly reasonable and does not affect the correctness of the normal use as the aggregates are only accessed on completion?
Jun 13 2020
Please don't change the style of the code, it messes up review and the full source. Please split the introduction and testing of the new relocation into one patch and using a different set of relocations to implement large code model. The latter part needs at least a test as well?
Jun 3 2020
I don't agree with the justification at all, but it also seems that noone else cares about the build option creep here.
May 27 2020
May 21 2020
I see that more as a short-coming in the existing DEFAULT_SYSROOT behavior and less an argument for making more cases like it. So the general idea is that for turnkey toolchains,
we want to allow customizing the "default" target of the toolchain to hard-code options like --sysroot, --target, -Wl,-rpath etc. Those are all related, so when using a different target, they no longer make sense. One way to deal with all those options in a consistent manner is hook into the logic for determining the current target, if none is explicitly specified on the command line or implicit from the executable name, then prepend some additional flags on the command line based on some cmake variable or so. This flags shouldn't trigger the unused argument warnings, so you can always pass -Wl,-rpath, --sysroot etc, independent of whether the compiler is in preprocessing / compile / assemble / link mode. That seems to be a more general and systematic approach than adding many additional build-time options.
I do agree with the feature request, but I'm not sure about the implementation. It doesn't seem to work well with the cross-compiling support in the driver as clearly shown by the amount of tests that need patching. Is cross-compiling a concern for you at all? Otherwise I would suggest going a slightly different route and use default values iff no "-target" or "target-command" mechanism is active. Might need a way to temporarily disable unused flag warnings, but that way would be pretty much toolchain independent?
May 13 2020
LGTM
May 3 2020
ARM's data detection only works for unstripped binaries. Other architectures often don't even have such markers at all.
The more compact output is a lot harder to read when you have to find embedded data. I wouldn't mind dropping half the spaces to have columns of 4 hex digits, but anything more is really hard to read.
I'm not sure about this change. It might make sense on x86, but many RISC architectures love to put data into the instruction stream and being able to pick them out is quite important for understanding the disassembly.
Apr 15 2020
LGTM
Apr 14 2020
Apr 8 2020
@ldionne I was updating libc++ from d42baff45d9700a199982ba0ac04dbc6c6d911bb and LLVM itself from 38aebe5c04ab4cb3695dc1bcc60b9a7b55215aff to 3d1424bc7a0e9a6f9887727e2bc93a10f50e1709 when it started failing. It likely has been present for a while.
This fixes the module build of clang for me.
Apr 5 2020
If no (inline) assembler is involved, you can likely get away with IAS. Just to give two trivial examples that are not handled by IAS right now:
Apr 3 2020
Louis, did I answer your questions?
Mar 28 2020
We tend to test push .section and .pushsection in this file, so it would be nice to continue doing that.
Can you add a variation with .pushsection for @progbits and @nobits? Otherwise LGTM.
Ping?
Mar 24 2020
This summarizes the IRC discussion.
Mar 21 2020
Mar 20 2020
The original code has a functional dependency between sz and bytes and whether they can be constant evaluated. But the code doesn't express that. I don't think we can enforce that in any sensible way. There are valid use cases after all where partial inlining would result in entirely sensible decisions, just think about the more typical case of __builtin_constant_p selecting between inline asm taking immediate operands and one taking register/memory operands. That's why I am saying that I consider it a lot more useful to provide reliable building blocks to express the dependency and make sure they work.
Mar 19 2020
...in the outer condition, I meant.
Yes, builtin_expect is just noise here. The point I wanted to make is that both sz and bytes should be used in builtin_constant_p in the other condition.
IMO the root of the problem here is that the branches are mixing predicated variables (bytes) with non-predicated variables (sz). If users want deterministic behavior here, that shouldn't be done.
Mar 18 2020
I was discussing this with Bill off-list to get a better idea of the original test case. Basically, with the new constant intrinsic pass, we can provide a stronger semantic: the default LLVM pass chain always constant folds expressions involving is.constant and performs DCE trivially dead branches resulting from the former folding. This means that if the original expression is adjusted from:
if (__builtin_expect(!!(sz >= 0 && sz < bytes), 0)) { if (!__builtin_constant_p(bytes)) ... }
to the functionally equivalent:
if (!(__builtin_constant_p(sz) && __builtin_constant_p(bytes) && sz >= 0 && sz >= bytes) && __builtin_expect(!!(sz >= 0 && sz < bytes), 0)) { if (!__builtin_constant_p(bytes)) ... }
then we can actually ensure proper DCE even with -O0 in the default pass chain. That depends over all on two properties:
- If __builtin_constant_p is constant folded by clang, it must DCE the appropiate places.
- the constant intrinsic pass is run
With -O1 or higher, this should work in general.
Mar 17 2020
Committed as 0b999f76575f0196d3cd01c0781b2513b0a1af15 without link.
Require __STDCPP_NEW_ALIGNMENT__ in C++03 mode. Prefer it over max_align_t in a number of tests when allocation alignment is desired. Adjust some tests to do minimal sanity checking of the alignment for C++03 only. Add an explicit check that __STDCPP_NEW_ALIGNMENT__ is more general than max_align_t if both are present.
Mar 16 2020
This looks much better than the in-tree state, thanks.
Mar 15 2020
Mar 14 2020
Mar 13 2020
Mar 12 2020
Mar 11 2020
Ping
Mar 9 2020
It still seems to be a perfectly reasonable optimisation under the semantics of is.constant. The code here seems to be an abuse of it though and makes assumptions that are not sensible.
I'm confused by that example. If jumpthreading makes it possible to answer true, it is no differerent from inlining and other use cases. The reverse is the problematic case, turning constant cases into non-constant cases?
Mar 3 2020
Mar 2 2020
Feb 26 2020
libc++ has no idea what a correct max_align_t is. The internal definition works due to historic requirements that all three fundamental types are supported for new/delete, but we don't have any such guarantees for every other context. A correctly implemented stddef.h does not provide max_align_t in C++03 mode, since that would pollute the global namespace. This means that libc++ currently has two failure modes: on NetBSD, it outright tries to use a non-existing symbol. On other platforms it silently defines max_align_t in a way that can be subtle wrong.
Feb 25 2020
Do not depend on max_align_t in C++03 mode in the test cases.
Feb 24 2020
Feb 21 2020
Feb 20 2020
Feb 19 2020
It is used both in <new> and <memory> and the use in the latter is currently unconditional AFAICT. I don't have a problem splitting the conditional to avoid the typedef. That would address the ODR concern?