Oct 7 2019
(back from vacation) Thanks, I think this looks good. Would you like somebody to commit this?
Oct 4 2019
I reverted this in rL373805, it caused https://bugs.llvm.org/show_bug.cgi?id=43566, which has to do with Windows EH. This code in general doesn't seem to consider address-taken blocks, so the problem is probably wider than just Windows EH. See the bug for a test case.
+ @Bigcheese, for amusement. We discussed some interesting behavior of _Pragma and C++ raw string literals last night.
Updated, with a slightly different form of the regex, that also allows the triple to just end at -windows.
Alternatively, we could just remove this part of the lit config altogether. There's no other OSes that have target-<os> as a feature (only system-<os> for the host where the test is running), and after D68133 and D68136, no tests actually use this feature any longer.
In most cases, target restrictions rely on using a component of the triple. If all Windows-target triples are guaranteed to spell the component 'windows' then REQUIRES: windows works, and we don't need target-windows at all. But I was under the impression that win32 was used in the triple sometimes?
At least at this point, it seems to use normalized triple names. For input to tools, win32 is a synonym to windows, and "mingw32" as OS name gets normalized to "windows-gnu".
Oct 3 2019
One last idea is that we could teach LLD to automatically add this directory to library search path, but then users who link with Visual C++ (not many anymore) will run into this as a corner case issue.
Another slightly related thread, regarding libs from the clang resource dir and how they are specified to the linker (regarding the builtins library): https://reviews.llvm.org/D51440
- Fix PGO build
Nice, the solution was right in front of us the whole time. :)
The abort() function raises SIGABRT, for which the default behavior is to trigger a coredump. Do we actually want that behavior?
Either _exit() (long available extension, which lld already uses) or quick_exit() (the new C standard way) seem possibly preferable?
I notice that x86 is the only target for which validateInput/OutputSize are implemented. If you are going to disable these checks, perhaps we should get rid of these methods and leave all these errors to the backend? You could add -S to the x86_32-inline-asm.c test and turn it into an integration test that shows that we no longer crash. It would need REQUIRES: x86-registered-target if you do that.
Sep 26 2019
I happened to notice that I felt the same way about this in 2014 that I do today:
That makes me feel like I should keep pushing for this change, even though so far people don't seem enthusiastic about it. :)
OK, so this is NFC for ELF, but has the relaxed __Z handling for COFF. lgtm
Sep 25 2019
lgtm, glad it saves object size.
Is there a scenario where both Itanium and Microsoft mangling schemes should be tried? (mingw?)
Sep 24 2019
I think of "disable-tail-calls" as a debugging tool, so I think what you've implemented here makes sense.
I see. I audited the other instances of SANITIZER_INTERFACE_WEAK_DEF, and they all seem to be properly namespaced into __asan_, __sanitizer_, etc.
The main alternative worth mentioning is _exit, which LLD already uses for the same reason you mention here.
We haven't even heard people complaining about lack of demangling of __Z, ___Z or ___Z prefixed names. I still lean towards keeping the "_Z" check for ELF to avoid false positive.
Sep 20 2019
I'd just like to note that this code is not well tested. A number of features and platforms have been added to the x86 prologue codepath that have not been tested in combination with guaranteed TCO, such as Win64 support. I've always assumed that users of this feature just like to live life dangerously.
Sep 18 2019
I don't think so. Is there a committer interested in doing this? I'm busy.
+ other debug info people
The main effect that I'm aware of here is that this will do CRLF conversion on Windows. Are we sure we really want that? I just did the opposite to TableGen output in rL371683. In general, I think the majority of tools that write text use OF_Text, so your change makes this minority of tools consistent with the other ones.
Sep 17 2019
From what I understand, the comdat group isn't necessary, so I disabled it on COFF in r372182. Can we simplify ELF to match?
- simplify merging check
@hans has been trying to build clang with PGO on Windows, so I'll defer this to him.
Hm, this broke check-asan on Windows, which exercises some code coverage features:
Sep 16 2019
- move test
Taking this to move the test around and try the other version...
Sep 13 2019
LGTM. Thanks for the fix!
I wasn't sure why profd was set to internal when looking at PR41380 (as for ELF, all are linkonce_oda). But your description explained that.
BTW, the intrinsic lowering happens before inline (I suppose you are talking the main IPA inline).
If this is only being used for clang-cl (or -fms-compatibility) mode only, is it possible to limit it to just that rather than it affecting pretty much everything?
Sep 12 2019
Sep 11 2019
Still really not a fan of this way. I think you can change the incoming DL in compatibility cases to add an address space when none exists on x86.