[PATCH] D87539: [MinGW][libclang] Allow simultaneous shared and static lib

2020-09-12 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7da941939902: [MinGW][libclang] Allow simultaneous shared and static lib (authored by mati865, committed by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D88518: Recognize setjmp and friends as builtins even if jmp_buf is not declared yet.

2020-10-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. This broke use of setjmp for mingw on x86_64. IIRC, in MSVC environments, the `_setjmp` function is considered built-in, which is given an implicit second argument by the compiler. In mingw targets on the other hand, the compiler normally doesn't know of any such

[PATCH] D89490: Introduce __attribute__((darwin_abi))

2020-10-15 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. I see that the llvm side of the patch lacks tests? Comment at: llvm/lib/IR/AsmWriter.cpp:379 +Out << "aarch64_darwincc"; +break; case CallingConv::SPIR_FUNC: Out << "spir_func"; break; The new code here has a different

[PATCH] D89225: [MinGW][clang-shlib] Build only when LLVM_LINK_LLVM_DYLIB is enabled

2020-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a reviewer: ASDenysPetrov. mstorsjo added a comment. +1, looks sensible to me - I can give it the formal approval a bit later, but leaving it open for a bit for others to comment on first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D89225: [MinGW][clang-shlib] Build only when LLVM_LINK_LLVM_DYLIB is enabled

2020-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3b1d018c0dba: [MinGW][clang-shlib] Build only when LLVM_LINK_LLVM_DYLIB is enabled (authored by mati865, committed by mstorsjo). Repository: rG

[PATCH] D89490: Introduce __attribute__((darwin_abi))

2020-10-16 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: llvm/lib/IR/AsmWriter.cpp:379 +Out << "aarch64_darwincc"; +break; case CallingConv::SPIR_FUNC: Out << "spir_func"; break; aguinet wrote: > mstorsjo wrote: > > The new code here has a different

[PATCH] D89490: Introduce __attribute__((darwin_abi))

2020-10-16 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.h:876 SDValue LowerAAPCS_VASTART(SDValue Op, SelectionDAG ) const; + SDValue LowerAAPCSFromDarwin_VASTART(SDValue Op, SelectionDAG ) const; SDValue LowerDarwin_VASTART(SDValue Op,

[PATCH] D89702: [clang] [msvc] Automatically link against oldnames just as linking against libcmt

2020-10-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, amccarth. Herald added a project: clang. mstorsjo requested review of this revision. If invoking clang-cl, both libcmt (or another lib, depending on the /M[TD](|d) options) and oldnames are passed as dependent libs. If compiling and

[PATCH] D87547: [MinGW][clang-shlib] Build by default on MinGW

2020-10-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87547#2322643 , @mati865 wrote: >> How many exports does your DLL end up with - is it close to the 64k limit, >> or far from it? Is there maybe some other library that is linked in, that >> increases the number of exported

[PATCH] D87547: [MinGW][clang-shlib] Build by default on MinGW

2020-10-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87547#2322325 , @mati865 wrote: > @ASDenysPetrov what CMake options do you use? > I'm unable to reproduce this error with Clang+LLD and GCC+Binutils from MSYS2. How many exports does your DLL end up with - is it close to the

[PATCH] D87547: [MinGW][clang-shlib] Build by default on MinGW

2020-10-10 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87547#2322900 , @mati865 wrote: > With `-DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER=clang > -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_RANLIB_COMPILER=llvm-ranlib > -DCMAKE_AR_COMPILER=llvm-ar -DCMAKE_LINKER=ld.lld

[PATCH] D87547: [MinGW][clang-shlib] Build by default on MinGW

2020-10-10 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87547#2323605 , @mati865 wrote: >> Or maybe even make it into a cmake option? > > I've considered it with default to true for unix and false for others but I'm > not sure if complicating Clang build options like that is

[PATCH] D87547: [MinGW][clang-shlib] Build by default on MinGW

2020-10-10 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Out of these, the second (only enable on mingw if libllvm is available) sounds sensible to me. Or maybe even make it into a cmake option? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87547/new/

[PATCH] D89702: [clang] [msvc] Automatically link against oldnames just as linking against libcmt

2020-10-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D89702#2339716 , @rnk wrote: > lgtm > > We need to invent spellings for /MD /MT for the GCC-style driver if we want > it to be usable in the MSVC environment. I don't think there's a precise > translation to the `-static-*`

[PATCH] D89490: Introduce __attribute__((darwin_abi))

2020-10-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:238 + if (D->hasAttr()) +return IsDarwin ? CC_C : CC_AArch64Darwin; + aaron.ballman wrote: > Can you help me understand this change a bit better? If the declaration uses > the Darwin

[PATCH] D89702: [clang] [msvc] Automatically link against oldnames just as linking against libcmt

2020-10-19 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5eece137bc76: [clang] Automatically link against oldnames just as linking against libcmt (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D86308: Reland [compiler-rt] Compile assembly files as ASM not C

2020-08-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Just FWIW, a similar change was made in libunwind earlier (c48974ffd7d1676f79d39d3b1e70f07d3a5e2e44 ), which then required workarounds for cmake issues on both mingw and macos (see

[PATCH] D88005: [clang] [MinGW] Add an implicit .exe suffix even when crosscompiling

2020-09-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D88005#2296254 , @dmajor wrote: > This change broke the configure step of Firefox mingw builds. > > The build bot won't give me the full details, so I'll need to set up a local > repro next week if needed, but my hunch is

[PATCH] D88005: [clang] [MinGW] Add an implicit .exe suffix even when crosscompiling

2020-09-21 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGead7c3cdc34c: [clang] [MinGW] Add an implicit .exe suffix even when crosscompiling (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D88002: [clang-cl] Always interpret the LIB env var as separated with semicolons

2020-09-21 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4d85444b317a: [clang-cl] Always interpret the LIB env var as separated with semicolons (authored by mstorsjo). Repository: rG LLVM Github

[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

2020-09-18 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87188#2282502 , @nikic wrote: > Based on an initial look, the changes in comparison predicates here are > probably a red herring. If I understand right, those predicates are switching > from signed to unsigned comparison

[PATCH] D88518: Recognize setjmp and friends as builtins even if jmp_buf is not declared yet.

2020-10-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D88518#2309538 , @rsmith wrote: > In D88518#2308085 , @mstorsjo wrote: > >> This broke use of setjmp for mingw on x86_64. > > Thanks, should be fixed in

[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

2020-09-18 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. This broke a few tests for me (generating code that now gives the fail result at runtime). I'm not entirely sure which bit is the culprit, but the difference in output (that breaks tests) for one object file is available at

[PATCH] D79117: [clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch names

2020-05-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a reviewer: rjmccall. mstorsjo added a comment. Adding some more Apple reviewers on this one - who can give it a look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79117/new/ https://reviews.llvm.org/D79117

[PATCH] D80492: Avoid linking libdl unless needed

2020-05-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a reviewer: beanz. mstorsjo added a subscriber: beanz. mstorsjo added a comment. I think this is ok, but adding @beanz who knows the cmake conventions better than me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80492/new/

[PATCH] D80425: Fix LLVM/Clang builds with mingw toolchain

2020-05-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:967 CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS) - elseif(LINKER_IS_LLD_LINK) + elseif(LINKER_IS_LLD_LINK AND NOT MINGW)

[PATCH] D80425: Fix LLVM/Clang builds with mingw toolchain

2020-05-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80425#2052607 , @thieta wrote: > I am planning to revise this one now that we have thinlto-cache-dir option > landed here are my plans: > > - Keep the libdl patch as is (seems like there are no more comments on this). > -

[PATCH] D79995: [clang] [MinGW] Fix libunwind extension

2020-05-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. LGTM now - thanks! What's your preferred git author line for this project? I can probably push it tomorrow. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79995/new/

[PATCH] D80492: Avoid linking libdl unless needed

2020-05-28 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0073c293a401: [clang] Avoid linking libdl unless needed (authored by thieta, committed by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D79995: [clang] [MinGW] Fix libunwind extension

2020-05-29 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGab4d02cf2659: [clang] [MinGW] Fix libunwind extension (authored by mati865, committed by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79995/new/

[PATCH] D79117: [clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch names

2020-05-29 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac1f7ab007e3: [clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch… (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt

2020-05-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: jacek, mati865, amccarth, rnk. Herald added a project: clang. The msvcrt library isn't a pure import library; it does contain regular object files with wrappers/fallbacks, and these can require linking against kernel32. This only makes a

[PATCH] D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt

2020-06-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80880#2066078 , @mati865 wrote: > Wouldn't it better fit in `AddLibGCC`? `AddLibGCC` is called twice, and we already add `-lkernel32` (plus a bunch of other libraries) after the first invocation, so that would either add

[PATCH] D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt

2020-06-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80880#2066130 , @mati865 wrote: > I don't know why `AddLibGCC` has to be called twice but that doesn't really > matter for this diff. From the clang perspective, I guess it's to match GCC. Originally, I guess the reason

[PATCH] D79995: [clang] [MinGW] Fix libunwind extension

2020-05-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D79995#2054298 , @mati865 wrote: > @mstorsjo @rnk will be away since June Yeah, I've noticed - but was waiting to see if he'd comment on it before that. Btw, would it be possible to add some test for this? (Sorry for not

[PATCH] D80425: Fix LLVM/Clang builds with mingw toolchain

2020-05-22 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/tools/libclang/CMakeLists.txt:71 + list(APPEND LIBS ${CMAKE_DL_LIBS}) endif() mati865 wrote: > thieta wrote: > > mstorsjo wrote: > > > If you say this is the same way it's done elsewhere, then sure - although

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80876#2068428 , @mstorsjo wrote: > But as for keeping the old default in mingw environments, would it make sense > to, if on windows, check the default target triple, and if that's a mingw > target

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80876#2067532 , @rnk wrote: > This seems wrong for mingw, so check with @mstorsjo. Thanks for the headsup! I agree that this change would make sense and would make things more consistent in general, but @rnk is also right

[PATCH] D88005: [clang] [MinGW] Add an implicit .exe suffix even when crosscompiling

2020-09-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, amccarth. Herald added a project: clang. mstorsjo requested review of this revision. GCC 8 changed behaviour wrt this, and made it consistent for cross compilation cases. While it's a change, it's a more sensible behaviour going

[PATCH] D88002: [clang-cl] Always interpret the LIB env var as separated with semicolons

2020-09-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, amccarth, thakis, hans. Herald added subscribers: llvm-commits, hiraditya. Herald added projects: clang, LLVM. mstorsjo requested review of this revision. When cross compiling with clang-cl, clang splits the INCLUDE env variable

[PATCH] D81385: Fix libdl linking for libclang in standalone mode

2020-07-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @beanz - I think people would like this to be included before the 11 branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81385/new/ https://reviews.llvm.org/D81385

[PATCH] D81795: [clang] Enable -mms-bitfields by default for mingw targets

2020-06-15 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D81795#2092878 , @rjmccall wrote: > Seems reasonable; GCC is the "system compiler" for this platform. Does > `isWindowsGNUEnvironment` exactly track the condition that GCC uses? It's > just MinGW, not Cygwin? Yes:

[PATCH] D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt

2020-06-17 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbeeed368b602: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81794: [clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally

2020-06-17 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7b3fe9699277: [clang] Dont emit warn_cxx_ms_struct when MSBitfields is enabled globally (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80880: [clang] [MinGW] Link kernel32 once after the last instance of msvcrt

2020-06-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80880#2066938 , @amccarth wrote: > Yowza. Mingw still links against MSVCRT?! Sorry, I missed this comment earlier - that I see that I want to reply to. Traditionally, mingw still links against the OS private msvcrt.dll

[PATCH] D81795: [clang] Enable -mms-bitfields by default for mingw targets

2020-06-17 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe3fd9dc9734c: [clang] Enable -mms-bitfields by default for mingw targets (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81795/new/

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80876#2071997 , @sbc100 wrote: > In D80876#2070233 , @mstorsjo wrote: > > > In D80876#2069970 , @sbc100 wrote: > > > > > Do you know how gcc

[PATCH] D81794: [clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally

2020-06-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rjmccall, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. This diagnostic (which defaults to an error, added in 95833f33bda6c92e746e0b0007b69c2c30bfc693) was (as far as I can see) intended to clearly point out

[PATCH] D81795: [clang] Enable -mms-bitfields by default for mingw targets

2020-06-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rjmccall, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. This matches GCC, which enabled -mms-bitfields by default for mingw targets in 4.7 [1]. [1] https://www.gnu.org/software/gcc/gcc-4.7/changes.html

[PATCH] D81794: [clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally

2020-06-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 270587. mstorsjo added a comment. Fixed the formatting CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81794/new/ https://reviews.llvm.org/D81794 Files: clang/lib/Sema/SemaDeclCXX.cpp clang/test/SemaCXX/ms_struct.cpp Index:

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a subscriber: mati865. mstorsjo added a comment. In D80876#2069418 , @sbc100 wrote: > If we want want to have the default on windows be dependent on mingw vs > not-mingw then we should do it across the board so it applies to llvm-ar, >

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80876#2069970 , @sbc100 wrote: > Do you know how gcc handles this case when running on mingw? It uses the gnu/unix quoting style - so that's the case for wanting clang to preserve compatibility with that behaviour. The

[PATCH] D81385: Fix libdl linking for libclang in standalone mode

2020-07-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a subscriber: hans. mstorsjo added a comment. Ping @beanz @hans - I think this is something that would be wanted to have fixed in the release branch (it's a regression for certain build configurations, afaik) - the fix awaits an ack from @beanz. Repository: rG LLVM Github

[PATCH] D81385: Fix libdl linking for libclang in standalone mode

2020-07-23 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa41af6e41e6f: [clang] Fix libdl linking for libclang in standalone mode (authored by thieta, committed by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D94364: [clang] Allow specifying the aapcs and aapcs-vfp for windows on arm

2021-01-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D94364#2490743 , @compnerd wrote: > Can you please add some more context around the motivation for this change? > It seems ... unnecessary as everything is already AAPCS/AAPCS-VFP. Yeah it's a redundant attribute, but I

[PATCH] D92570: [clang] [Headers] Use the corresponding _aligned_free or __mingw_aligned_free in _mm_free

2020-12-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: amccarth, rnk, chapuni. Herald added a project: clang. mstorsjo requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D92570 Files: clang/lib/Headers/mm_malloc.h Index:

[PATCH] D92570: [clang] [Headers] Use the corresponding _aligned_free or __mingw_aligned_free in _mm_free

2020-12-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/lib/Headers/mm_malloc.h:42 void *__mallocedMemory; #if defined(__MINGW32__) __mallocedMemory = __mingw_aligned_malloc(__size, __align); rnk wrote: > This has been here since 2011, and somehow nobody

[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

2020-12-10 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87188#2445414 , @lebedev.ri wrote: > @mstorsjo please can you be more specific what kind of tests are starting to > fail? > Do those tests just check that the code compiled into an identical assembly? No, it's video/audio

[PATCH] D92570: [clang] [Headers] Use the corresponding _aligned_free or __mingw_aligned_free in _mm_free

2020-12-04 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc17fdca1883d: [clang] [Headers] Use the corresponding _aligned_free or __mingw_aligned_free… (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D73156: [clang] Build clang-shlib on mingw

2020-11-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. This actually is done (almost) like this in current git master, see D87547 and D89225 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73156/new/

[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

2020-12-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87188#2461497 , @lebedev.ri wrote: > @mstorsjo i've bothered @dmajor to give this a try on some of mozilla's CI, > and unfortunately it came back green.. > I don't recall if i can reproduce it locally (on vanilla test suite,

[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

2020-12-18 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87188#2461510 , @mstorsjo wrote: > In D87188#2461497 , @lebedev.ri > wrote: > >> @mstorsjo i've bothered @dmajor to give this a try on some of mozilla's CI, >> and unfortunately it

[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

2020-12-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. (Also, for studying the effect of this one, on an IR level, the difference is already present in the output of `-S -emit-llvm` from clang, unless using `-Xclang -disable-llvm-passes`, but I'm sure you already took that into account.) Repository: rG LLVM Github

[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

2020-12-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. FWIW, the issue is reproducible for an aarch64-linux-gnu target as well. If it would help someone, I could make a prepackaged build for that target, with object files + this single source function that breaks it + sample input files to run it with. Repository: rG

[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

2020-12-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87188#2447958 , @lebedev.ri wrote: > Just to be sure, i just run the entire compilation of `vc1_block-aarch64.c` > through alive2, and as far as i can tell, it did not report any IR-level > miscompilations. > So either the

[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

2020-12-18 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87188#2463566 , @lebedev.ri wrote: > Once again, thank you @mstorsjo and @dmgreen! Awesome, thanks guys! I'll let you know tomorrow in the unlikely case if this still caused some other regressions as well (or possibly

[PATCH] D87188: [InstCombine] Canonicalize SPF to abs intrinc

2020-12-18 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D87188#2463733 , @mstorsjo wrote: > In D87188#2463566 , @lebedev.ri > wrote: > >> Once again, thank you @mstorsjo and @dmgreen! > > Awesome, thanks guys! > > I'll let you know tomorrow

[PATCH] D90571: [compiler-rt] [ubsan] Use the itanium type info lookup for mingw targets

2020-11-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 302374. mstorsjo added a comment. Just checking `_MSC_VER` instead of checking `SANITIZER_WINDOWS && !__MINGW32__`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90571/new/ https://reviews.llvm.org/D90571 Files:

[PATCH] D90571: [compiler-rt] [ubsan] Use the itanium type info lookup for mingw targets

2020-11-02 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG076d351e8bdd: [compiler-rt] [ubsan] Use the itanium type info lookup for mingw targets (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D90572: [clang] [MinGW] Allow using the vptr sanitizer

2020-11-02 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGeaae6fdf67e1: [clang] [MinGW] Allow using the vptr sanitizer (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D90572: [clang] [MinGW] Allow using the vptr sanitizer

2020-11-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D90572#2370716 , @sberg wrote: > Smells like this breaks various bots due to a -fsanitize=...,... option now > listing 18 instead of 17 items, see > http://lab.llvm.org:8011/#builders/76/builds/363, >

[PATCH] D90572: [clang] [MinGW] Allow using the vptr sanitizer

2020-11-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: rnk. Herald added a project: clang. mstorsjo requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D90572 Files: clang/lib/Driver/ToolChains/MinGW.cpp clang/test/Driver/mingw-sanitizers.c

[PATCH] D90571: [compiler-rt] [ubsan] Use the itanium type info lookup for mingw targets

2020-11-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: rnk. Herald added subscribers: Sanitizers, dberris. Herald added a project: Sanitizers. mstorsjo requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D90571 Files:

[PATCH] D94364: [clang] Allow specifying the aapcs and aapcs-vfp for windows on arm

2021-01-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, compnerd, smeenai. Herald added a subscriber: kristof.beyls. mstorsjo requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D94364 Files:

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. > "Windows Kits/10" has the drawback that it contains a space and yet another > number. Ideally the contents of that directory would be available under some > short name, so I went with /winsdkdir /win_sdk. I'm not married to this > though. Maybe /WinSdk looks move

[PATCH] D95660: [NFC] Disallow unused prefixes under clang/test/Driver

2021-01-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ok for the fsanitize.c bits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95660/new/ https://reviews.llvm.org/D95660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D101479: [Driver] Support libc++ in MSVC

2021-06-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Couldn’t this commit have been kept in, and just reverting the one for using it in the fuchsia cmake cache? (I’m not using this particular commit myself, just observing.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D101479: [Driver] Support libc++ in MSVC

2021-06-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D101479#2813797 , @phosek wrote: > In D101479#2813724 , @mstorsjo > wrote: > >> Couldn’t this commit have been kept in, and just reverting the one for using >> it in the fuchsia

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-07 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6de45b9e6a2c: [clang] Fix reading long doubles with va_arg on x86_64 mingw (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D103452?vs=349517=350390#toc Repository: rG LLVM

[PATCH] D103837: [clang] Apply MS ABI details on __builtin_ms_va_list on non-windows platforms on x86_64

2021-06-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: rnk. Herald added a subscriber: pengfei. mstorsjo requested review of this revision. Herald added a project: clang. This fixes inconsistencies in the ms_abi.c testcase. Also add a couple cases of missing double pointers in the windows

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/test/CodeGen/mingw-long-double.c:56-58 + // GNU32: bitcast i8* %argp.cur to x86_fp80* + // GNU64: bitcast i8* %argp.cur to x86_fp80** + // MSC64: bitcast i8* %argp.cur to double* mstorsjo wrote: > rnk wrote: >

[PATCH] D103452: [clang] Fix reading long doubles with va_arg on x86_64 mingw

2021-06-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/test/CodeGen/mingw-long-double.c:56-58 + // GNU32: bitcast i8* %argp.cur to x86_fp80* + // GNU64: bitcast i8* %argp.cur to x86_fp80** + // MSC64: bitcast i8* %argp.cur to double* rnk wrote: > mstorsjo wrote: >

[PATCH] D103837: [clang] Apply MS ABI details on __builtin_ms_va_list on non-windows platforms on x86_64

2021-06-08 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb34da6ff9c1d: [clang] Apply MS ABI details on __builtin_ms_va_list on non-windows platforms… (authored by mstorsjo). Repository: rG LLVM Github

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-06-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D104556#2837104 , @rnk wrote: > In D104556#2837006 , @MaskRay wrote: > >> Is it possible to ask MSVC to add the 64-bit `IMAGE_REL_AMD64_REL64` and >> `IMAGE_REL_ARM64_REL64`? >>

[PATCH] D104819: [ADT] Rename StringRef case insensitive methods for clarity

2021-06-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D104819#2839263 , @dexonsmith wrote: > LGTM, once @MaskRay is happy. I have a couple of minor comments inline too. > > (I also see that there are some clang-format suggestions in the unit tests; > not sure any of them are

[PATCH] D104819: [ADT] Rename StringRef case insensitive methods for clarity

2021-06-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D104819#2837421 , @dexonsmith wrote: > Given how large this is, would it be reasonable to split this up a bit more? > > What I might do if this were my patch: get a review of the API change + the > manual changes in one

[PATCH] D104819: [ADT] Rename StringRef case insensitive methods for clarity

2021-06-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 354178. mstorsjo added a comment. Reduced this patch only to updating of the StringRef class itself and its unit test, removing the mechanical changes. Removed superfluous method name duplication in doxygen comments. Repository: rG LLVM Github Monorepo

[PATCH] D104819: [ADT] Rename StringRef case insensitive methods for clarity

2021-06-24 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3eed57e7ef7d: [ADT] Rename StringRef case insensitive methods for clarity (authored by mstorsjo). Changed prior to commit:

[PATCH] D103495: [static initializers] Don't put ordered dynamic initializers of static variables into global_ctors

2021-06-08 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Thanks for looping me in; I don't have any objection to this, as far as I can see, the reasoning seems sensible, and the most brittle testcase I have (from what I remember offhand) seems to run fine with this change. CHANGES SINCE LAST ACTION

[PATCH] D101479: [Driver] Support libc++ in MSVC

2021-05-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D101479#2741223 , @phosek wrote: > In D101479#2741202 , @mstorsjo > wrote: > >> In D101479#2740895 , @phosek wrote: >> >>> On other

[PATCH] D101479: [Driver] Support libc++ in MSVC

2021-05-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D101479#2740895 , @phosek wrote: > On other platforms the decision whether to use static or shared is controlled > by `-static-libstdc++`, does CL have a similar flag or shall we support > `-static-libstdc++` in MSVC driver

[PATCH] D101479: [Driver] Support libc++ in MSVC

2021-05-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D101479#2750765 , @amccarth wrote: > Ah, thanks for explaining that! In the VC++ stack, `/MD` and `/MT` make the > DLL/static choice for the CRT, the C++ standard library, and the compiler > runtime.[1] It never occurred

[PATCH] D102873: [clang] [MinGW] Fix gcc version detection/picking

2021-05-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added a reviewer: rnk. mstorsjo requested review of this revision. Herald added a project: clang. Actually compare each version to the version of the last chosen one. There's no guarantee that the added test case does showcase the previous issue (it

[PATCH] D102812: [clang] Don't pass multiple backend options if mixing -mimplicit-it and -Wa,-mimplicit-it

2021-05-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 346856. mstorsjo added a comment. Updated to allow mismatches and just picking the value that is set last on the command line - what do you think of this version? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D102812: [clang] Don't pass multiple backend options if mixing -mimplicit-it and -Wa,-mimplicit-it

2021-05-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D102812#2770821 , @DavidSpickett wrote: > Given that using both options currently crashes clang (therefore no one is > relying on this yet) and GCC doesn't have `-mimplicit-it` I think what you > have is actually the best

[PATCH] D102873: [clang] [MinGW] Fix gcc version detection/picking

2021-05-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 346850. mstorsjo added a comment. Update another affected testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102873/new/ https://reviews.llvm.org/D102873 Files: clang/lib/Driver/ToolChains/MinGW.cpp

[PATCH] D102812: [clang] Don't pass multiple backend options if mixing -mimplicit-it and -Wa,-mimplicit-it

2021-05-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D102812#2773132 , @DavidSpickett wrote: >> Updated to allow mismatches and just picking the value that is set last on >> the command line - what do you think of this version? > > My initial reaction was that I'd prefer to

[PATCH] D102812: [clang] Don't pass multiple backend options if mixing -mimplicit-it and -Wa,-mimplicit-it

2021-05-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2371 + return Value == "always" || Value == "never" || Value == "arm" || + Value == "thumb"; +} I guess this could be a `StringSwitch` too if you think that's nicer.

[PATCH] D102812: [clang] Don't pass multiple backend options if mixing -mimplicit-it and -Wa,-mimplicit-it

2021-05-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2428 for (const Arg *A : Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler)) { A->claim(); We could also just add `options::OPT_mimplicit_it_EQ` into

[PATCH] D102812: [clang] Don't pass multiple backend options if mixing -mimplicit-it and -Wa,-mimplicit-it

2021-05-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D102812#2770516 , @DavidSpickett wrote: >> If multiple instances of the -arm-implicit-it option is passed to >> the backend, it errors out. > > Does it make sense to fix that side too? I guess it could, although I didn't

<    2   3   4   5   6   7   8   9   10   11   >