Page MenuHomePhabricator

glandium (Mike Hommey)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 7 2017, 12:52 AM (281 w, 4 d)

Recent Activity

Mon, Mar 27

glandium resigned from D146930: [MCP] Do not try forward non-existent sub-register of a copy.

I'm not a reviewer, but I can confirm the patch fixes the issue as it was filed.

Mon, Mar 27, 7:46 PM · Restricted Project, Restricted Project

Wed, Mar 22

glandium requested review of D146682: [libcxx] Fix build bustage with threads disabled.
Wed, Mar 22, 7:29 PM · Restricted Project, Restricted Project
glandium requested review of D146664: Apply the same fallbacks as runtimes search for stdlib search.
Wed, Mar 22, 3:10 PM · Restricted Project, Restricted Project

Thu, Mar 9

glandium added a comment to D141188: [MergeICmps] Adapt to non-eq comparisons.

I'm testing it against trunk minus the patch that causes the crash. In a couple hours or less, I'll be able to tell you whether the latest version or the patch works properly for Firefox.

Thu, Mar 9, 12:40 AM · Restricted Project, Restricted Project

Wed, Mar 8

glandium added a comment to D143225: [SROA] Create additional vector type candidates based on store and load slices.

This is causing crashes when building Skia. See https://reviews.llvm.org/D141188#4179444

Sorry about that. Do you have steps to repro?

Wed, Mar 8, 11:39 PM · Restricted Project, Restricted Project
glandium added a comment to D141188: [MergeICmps] Adapt to non-eq comparisons.

The crash comes from D143225.

Oh, thanks @glandium very much for your information.
In that case, I'll land this patch in the near future, as the previous runtime issue has been resolved.

Wed, Mar 8, 11:35 PM · Restricted Project, Restricted Project
glandium added a comment to D141188: [MergeICmps] Adapt to non-eq comparisons.

The crash comes from D143225.

Wed, Mar 8, 10:18 PM · Restricted Project, Restricted Project
glandium added a comment to D143225: [SROA] Create additional vector type candidates based on store and load slices.

This is causing crashes when building Skia. See https://reviews.llvm.org/D141188#4179444

Wed, Mar 8, 10:18 PM · Restricted Project, Restricted Project
glandium added a comment to D141188: [MergeICmps] Adapt to non-eq comparisons.

The crash is actually happening without the patch too. It happens both in Firefox and Chrome because both are using Skia, and the source that triggers the crash is in Skia.

Wed, Mar 8, 10:01 PM · Restricted Project, Restricted Project
glandium added a comment to D141188: [MergeICmps] Adapt to non-eq comparisons.

FYI this patch also caused some of Firefox's unit tests to fail, e.g. https://treeherder.mozilla.org/logviewer?job_id=407511605&repo=toolchains&lineNumber=32470

hi @glandium, As I don't know how to check the above tests, would you help me to check that base on my new update changes ?

Wed, Mar 8, 8:03 PM · Restricted Project, Restricted Project

Thu, Mar 2

glandium added a comment to D141188: [MergeICmps] Adapt to non-eq comparisons.

FYI this patch also caused some of Firefox's unit tests to fail, e.g. https://treeherder.mozilla.org/logviewer?job_id=407511605&repo=toolchains&lineNumber=32470

Thu, Mar 2, 8:54 PM · Restricted Project, Restricted Project

Jan 31 2023

glandium resigned from D142989: [extract_symbols.py] Better handling of templates.

Could you add before/after figures of the numbers of symbols in, say, clang.symbols in the summary?

Jan 31 2023, 7:36 PM · Restricted Project, Restricted Project

Jan 25 2023

glandium updated the summary of D142431: [extract_symbols.py] Filter out more symbols for MSVC.
Jan 25 2023, 1:52 PM · Restricted Project, Restricted Project
glandium updated the diff for D142431: [extract_symbols.py] Filter out more symbols for MSVC.

Updated per feedback.

Jan 25 2023, 1:52 PM · Restricted Project, Restricted Project

Jan 24 2023

glandium updated the diff for D142431: [extract_symbols.py] Filter out more symbols for MSVC.

Switched to skipping X86GenMnemonicTables functions instead of private methods.

Jan 24 2023, 7:47 PM · Restricted Project, Restricted Project
glandium planned changes to D142431: [extract_symbols.py] Filter out more symbols for MSVC.
Jan 24 2023, 1:59 PM · Restricted Project, Restricted Project

Jan 23 2023

glandium updated the summary of D142431: [extract_symbols.py] Filter out more symbols for MSVC.
Jan 23 2023, 11:38 PM · Restricted Project, Restricted Project
glandium added reviewers for D142431: [extract_symbols.py] Filter out more symbols for MSVC: MaskRay, michaelplatings, rnk, john.brawn, lenary.
Jan 23 2023, 11:37 PM · Restricted Project, Restricted Project
glandium requested review of D142431: [extract_symbols.py] Filter out more symbols for MSVC.
Jan 23 2023, 11:35 PM · Restricted Project, Restricted Project

Jan 19 2023

glandium added a comment to D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library..

with -DLLVM_LINK_LLVM_DYLIB=ON, in case it matters.

Jan 19 2023, 8:58 PM · Restricted Project, Restricted Project
glandium added a comment to D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library..

I'm still seeing the build error on clangd-fuzzer on a commit that clearly has e84d69f52d9a9fab9162128d8fe8ebec99ea60da in its history.

Jan 19 2023, 8:57 PM · Restricted Project, Restricted Project
glandium added a comment to D136651: [Clang] Give Clang the ability to use a shared stat cache.

Oh yes, we're using -DLLVM_LINK_LLVM_DYLIB=ON too, so that would be the main trigger.

Jan 19 2023, 1:36 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D136651: [Clang] Give Clang the ability to use a shared stat cache.

This broke our mac builds with errors like:

ld64.lld: error: undefined symbol: CFRunLoopRun
>>> referenced by tools/clang/tools/clang-stat-cache/CMakeFiles/clang-stat-cache.dir/clang-stat-cache.cpp.o:(symbol main+0x11be)

(and many more symbols)

Jan 19 2023, 12:25 AM · Restricted Project, Restricted Project, Restricted Project

Jan 18 2023

glandium added a comment to D136651: [Clang] Give Clang the ability to use a shared stat cache.

This broke our mac builds with errors like:

ld64.lld: error: undefined symbol: CFRunLoopRun
>>> referenced by tools/clang/tools/clang-stat-cache/CMakeFiles/clang-stat-cache.dir/clang-stat-cache.cpp.o:(symbol main+0x11be)

(and many more symbols)

Jan 18 2023, 8:39 PM · Restricted Project, Restricted Project, Restricted Project

Dec 28 2022

glandium added a comment to D140679: [MC] [llvm-ml] Add support for the extrn keyword.

@epastor could you land this for me?

Dec 28 2022, 1:48 PM · Restricted Project, Restricted Project

Dec 26 2022

glandium requested review of D140679: [MC] [llvm-ml] Add support for the extrn keyword.
Dec 26 2022, 6:02 PM · Restricted Project, Restricted Project

Dec 22 2022

glandium added a comment to D139663: Emit unwind information in the .debug_frame section when the .cfi_sections .debug_frame directive is used..

FWIW, I'm seeing targetAtom != NULL assertions in function Fixup in ld.hpp in ld64 when build Firefox with LTO since this change (I can only guess the crashes mentioned in the revert are the same?).

Dec 22 2022, 11:31 PM · Restricted Project, Restricted Project, debug-info

Dec 8 2022

glandium added a comment to D137982: Reland [pgo] Avoid introducing relocations by using private alias.

I can reproduce with this:

cmake -G Ninja -S llvm -B stage1 -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release
ninja -C stage1
cmake -G Ninja -S llvm -B stage2 -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$PWD/stage1/bin/clang -DLLVM_BUILD_INSTRUMENTED=IR -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=gold"
ninja -C stage2

The key is to be using GNU gold.

Dec 8 2022, 10:40 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D135402: [LLD] Enable --no-undefined-version by default..
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMCreateDisasm' failed: symbol not defined
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMCreateDisasmCPU' failed: symbol not defined
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMDisasmDispose' failed: symbol not defined
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMDisasmInstruction' failed: symbol not defined
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMSetDisasmOptions' failed: symbol not defined
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMCreateDisasmCPUFeatures' failed: symbol not defined

This is happening reliably when linking libLTO in a build with LLVM_LINK_LLVM_DYLIB=ON and LLVM_ENABLE_LLD=ON because in that case these symbols are in libLLVM instead of libLTO.

Dec 8 2022, 8:40 PM · Restricted Project, Restricted Project
glandium added a comment to D137982: Reland [pgo] Avoid introducing relocations by using private alias.

The errors from the comment https://reviews.llvm.org/D137982#3929427 are back after the relanding.

Dec 8 2022, 8:21 PM · Restricted Project, Restricted Project, Restricted Project

Nov 29 2022

glandium added a comment to D138174: [lld-macho] Increase slop to prevent thunk out of range again..

I can't dig into this at the moment, but I opened an issue with a reproducer (https://github.com/llvm/llvm-project/issues/59259)

Nov 29 2022, 9:20 PM · Restricted Project, Restricted Project, Restricted Project

Nov 22 2022

glandium added a comment to D137217: [LTO][COFF] Use bitcode file names in lto native object file names..

Almost there, but not quite:

[task 2022-11-22T23:55:36.341Z] /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1106:6: error: no matching function for call to object of type '(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1095:7)'
[task 2022-11-22T23:55:36.341Z]     *AddStream(Task)->OS << MB->getBuffer();
[task 2022-11-22T23:55:36.341Z]      ^~~~~~~~~
[task 2022-11-22T23:55:36.341Z] /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1095:7: note: candidate function not viable: requires 2 arguments, but 1 was provided
[task 2022-11-22T23:55:36.341Z]       [&](size_t Task,
[task 2022-11-22T23:55:36.341Z]       ^
[task 2022-11-22T23:55:36.341Z] 1 error generated.
Nov 22 2022, 4:35 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D138174: [lld-macho] Increase slop to prevent thunk out of range again..

Thanks. We should work on a less brittle fix soon...

Nov 22 2022, 2:48 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D137217: [LTO][COFF] Use bitcode file names in lto native object file names..

Still broken:

task 2022-11-22T22:09:00.912Z] /usr/lib/llvm-11/bin/clang++ --sysroot=/builds/worker/fetches/sysroot -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/gold -I/builds/worker/fetches/llvm-project/llvm/tools/gold -Iinclude -I/builds/worker/fetches/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fPIC  -fno-exceptions -fno-rtti -std=c++17 -MD -MT tools/gold/CMakeFiles/LLVMgold.dir/gold-plugin.cpp.o -MF tools/gold/CMakeFiles/LLVMgold.dir/gold-plugin.cpp.o.d -o tools/gold/CMakeFiles/LLVMgold.dir/gold-plugin.cpp.o -c /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp
[task 2022-11-22T22:09:00.912Z] /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1111:18: error: no viable conversion from '(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'llvm::AddStreamFn' (aka 'function<Expected<std::unique_ptr<CachedFileStream>> (unsigned int, const llvm::Twine &)>')
[task 2022-11-22T22:09:00.912Z]   check(Lto->run(AddStream, Cache));
[task 2022-11-22T22:09:00.912Z]                  ^~~~~~~~~
[task 2022-11-22T22:09:00.912Z] /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:421:7: note: candidate constructor not viable: no known conversion from '(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
[task 2022-11-22T22:09:00.912Z]       function(nullptr_t) noexcept
[task 2022-11-22T22:09:00.912Z]       ^
[task 2022-11-22T22:09:00.912Z] /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:432:7: note: candidate constructor not viable: no known conversion from '(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'const std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, const llvm::Twine &)> &' for 1st argument
[task 2022-11-22T22:09:00.912Z]       function(const function& __x);
[task 2022-11-22T22:09:00.912Z]       ^
[task 2022-11-22T22:09:00.912Z] /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:441:7: note: candidate constructor not viable: no known conversion from '(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, const llvm::Twine &)> &&' for 1st argument
[task 2022-11-22T22:09:00.912Z]       function(function&& __x) noexcept : _Function_base()
[task 2022-11-22T22:09:00.913Z]       ^
[task 2022-11-22T22:09:00.913Z] /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:465:2: note: candidate template ignored: substitution failure [with _Functor = (lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20), $1 = void]: no type named 'type' in 'std::result_of<(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20) &(unsigned int, const llvm::Twine &)>'
[task 2022-11-22T22:09:00.913Z]         function(_Functor);
[task 2022-11-22T22:09:00.913Z]         ^
[task 2022-11-22T22:09:00.913Z] /builds/worker/fetches/llvm-project/llvm/include/llvm/LTO/LTO.h:278:25: note: passing argument to parameter 'AddStream' here
[task 2022-11-22T22:09:00.913Z]   Error run(AddStreamFn AddStream, FileCache Cache = nullptr);
[task 2022-11-22T22:09:00.913Z]                         ^
[task 2022-11-22T22:09:00.913Z] 1 error generated.
Nov 22 2022, 2:46 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D137217: [LTO][COFF] Use bitcode file names in lto native object file names..

This broke the gold plugin:

[task 2022-11-22T21:03:29.486Z] /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1108:19: error: no matching function for call to 'localCache'
[task 2022-11-22T21:03:29.486Z]     Cache = check(localCache("ThinLTO", "Thin", options::cache_dir, AddBuffer));
[task 2022-11-22T21:03:29.487Z]                   ^~~~~~~~~~
[task 2022-11-22T21:03:29.487Z] /builds/worker/fetches/llvm-project/llvm/include/llvm/Support/Caching.h:72:21: note: candidate function not viable: no known conversion from '(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1102:20)' to 'llvm::AddBufferFn' (aka 'function<void (unsigned int, const llvm::Twine &, std::unique_ptr<MemoryBuffer>)>') for 4th argument
[task 2022-11-22T21:03:29.487Z] Expected<FileCache> localCache(
[task 2022-11-22T21:03:29.488Z]                     ^
[task 2022-11-22T21:03:29.488Z] /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1110:18: error: no viable conversion from '(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'llvm::AddStreamFn' (aka 'function<Expected<std::unique_ptr<CachedFileStream>> (unsigned int, const llvm::Twine &)>')
[task 2022-11-22T21:03:29.488Z]   check(Lto->run(AddStream, Cache));
[task 2022-11-22T21:03:29.488Z]                  ^~~~~~~~~
[task 2022-11-22T21:03:29.488Z] /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:421:7: note: candidate constructor not viable: no known conversion from '(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
[task 2022-11-22T21:03:29.488Z]       function(nullptr_t) noexcept
[task 2022-11-22T21:03:29.488Z]       ^
[task 2022-11-22T21:03:29.489Z] /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:432:7: note: candidate constructor not viable: no known conversion from '(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'const std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, const llvm::Twine &)> &' for 1st argument
[task 2022-11-22T21:03:29.489Z]       function(const function& __x);
[task 2022-11-22T21:03:29.489Z]       ^
[task 2022-11-22T21:03:29.489Z] /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:441:7: note: candidate constructor not viable: no known conversion from '(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20)' to 'std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, const llvm::Twine &)> &&' for 1st argument
[task 2022-11-22T21:03:29.489Z]       function(function&& __x) noexcept : _Function_base()
[task 2022-11-22T21:03:29.489Z]       ^
[task 2022-11-22T21:03:29.489Z] /builds/worker/fetches/sysroot/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:465:2: note: candidate template ignored: substitution failure [with _Functor = (lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20), $1 = void]: no type named 'type' in 'std::result_of<(lambda at /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1094:20) &(unsigned int, const llvm::Twine &)>'
[task 2022-11-22T21:03:29.489Z]         function(_Functor);
[task 2022-11-22T21:03:29.489Z]         ^
[task 2022-11-22T21:03:29.489Z] /builds/worker/fetches/llvm-project/llvm/include/llvm/LTO/LTO.h:278:25: note: passing argument to parameter 'AddStream' here
[task 2022-11-22T21:03:29.489Z]   Error run(AddStreamFn AddStream, FileCache Cache = nullptr);
[task 2022-11-22T21:03:29.489Z]                         ^
[task 2022-11-22T21:03:29.489Z] 2 errors generated.
Nov 22 2022, 1:38 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Nov 21 2022

glandium added a comment to D131425: [libc++] Remove workarounds for systems that used to require __need_XXX macros.

(using a sysroot that contains glibc 2.19)

Nov 21 2022, 4:40 PM · Restricted Project, Restricted Project
glandium added a comment to D131425: [libc++] Remove workarounds for systems that used to require __need_XXX macros.

Also getting errors when building compiler-rt standalone:

[task 2022-11-21T21:07:28.272Z] In file included from /builds/worker/fetches/llvm-project/libcxx/src/mutex.cpp:11:
[task 2022-11-21T21:07:28.272Z] In file included from include/c++/v1/mutex:192:
[task 2022-11-21T21:07:28.272Z] In file included from include/c++/v1/__mutex_base:20:
[task 2022-11-21T21:07:28.272Z] In file included from include/c++/v1/system_error:154:
[task 2022-11-21T21:07:28.272Z] In file included from include/c++/v1/string:561:
[task 2022-11-21T21:07:28.272Z] In file included from include/c++/v1/__string/char_traits.h:24:
[task 2022-11-21T21:07:28.272Z] include/c++/v1/cstdio:160:9: error: target of using declaration conflicts with declaration already in scope
[task 2022-11-21T21:07:28.272Z] using ::remove _LIBCPP_USING_IF_EXISTS;
[task 2022-11-21T21:07:28.272Z]         ^
[task 2022-11-21T21:07:28.272Z] include/c++/v1/cstdio:160:1: note: target of using declaration
[task 2022-11-21T21:07:28.272Z] using ::remove _LIBCPP_USING_IF_EXISTS;
[task 2022-11-21T21:07:28.272Z] ^
[task 2022-11-21T21:07:28.272Z] include/c++/v1/__algorithm/remove.h:25:1: note: conflicting declaration
[task 2022-11-21T21:07:28.272Z] remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
[task 2022-11-21T21:07:28.272Z] ^
[task 2022-11-21T21:07:28.272Z] In file included from /builds/worker/fetches/llvm-project/libcxx/src/mutex.cpp:11:
[task 2022-11-21T21:07:28.272Z] In file included from include/c++/v1/mutex:192:
[task 2022-11-21T21:07:28.272Z] In file included from include/c++/v1/__mutex_base:20:
[task 2022-11-21T21:07:28.272Z] In file included from include/c++/v1/system_error:154:
[task 2022-11-21T21:07:28.272Z] In file included from include/c++/v1/string:561:
[task 2022-11-21T21:07:28.272Z] include/c++/v1/__string/char_traits.h:81:26: error: use of undeclared identifier 'EOF'
[task 2022-11-21T21:07:28.272Z]         {return int_type(EOF);}
[task 2022-11-21T21:07:28.272Z]                          ^
[task 2022-11-21T21:07:28.272Z] include/c++/v1/__string/char_traits.h:80:47: error: no return statement in constexpr function
[task 2022-11-21T21:07:28.272Z]     static inline _LIBCPP_CONSTEXPR int_type  eof() _NOEXCEPT
[task 2022-11-21T21:07:28.272Z]                                               ^
[task 2022-11-21T21:07:28.272Z] include/c++/v1/__string/char_traits.h:257:26: error: use of undeclared identifier 'EOF'
[task 2022-11-21T21:07:28.272Z]         {return int_type(EOF);}
[task 2022-11-21T21:07:28.272Z]                          ^
[task 2022-11-21T21:07:28.272Z] include/c++/v1/__string/char_traits.h:256:47: error: no return statement in constexpr function
[task 2022-11-21T21:07:28.272Z]     static inline _LIBCPP_CONSTEXPR int_type  eof() _NOEXCEPT
[task 2022-11-21T21:07:28.272Z]                                               ^
[task 2022-11-21T21:07:28.272Z] include/c++/v1/__string/char_traits.h:482:26: error: use of undeclared identifier 'EOF'
[task 2022-11-21T21:07:28.272Z]         {return int_type(EOF);}
[task 2022-11-21T21:07:28.272Z]                          ^
[task 2022-11-21T21:07:28.272Z] include/c++/v1/__string/char_traits.h:481:38: error: no return statement in constexpr function
[task 2022-11-21T21:07:28.272Z]     static inline constexpr int_type eof() noexcept
[task 2022-11-21T21:07:28.272Z]                                      ^
[task 2022-11-21T21:07:28.272Z] 7 errors generated.
[task 2022-11-21T21:07:28.577Z] [880/906] Building CXX object libcxx/src/CMakeFiles/cxx_static.dir/random_shuffle.cpp.o
Nov 21 2022, 4:39 PM · Restricted Project, Restricted Project

Nov 16 2022

glandium added a comment to D138174: [lld-macho] Increase slop to prevent thunk out of range again..

Can you push this for me?

Nov 16 2022, 6:23 PM · Restricted Project, Restricted Project, Restricted Project
glandium requested review of D138174: [lld-macho] Increase slop to prevent thunk out of range again..
Nov 16 2022, 5:59 PM · Restricted Project, Restricted Project, Restricted Project

Nov 15 2022

Herald added a project to D116705: [lld-macho] Increase slops to prevent thunk out of range: Restricted Project.

FWIW, we've had this happen recently on non-optimized builds of Firefox with the 256 value (although it's not happening anymore as of writing, whatever made it disappear)... is there a point where increasing the slop is going to be a problem?

Nov 15 2022, 8:27 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D137982: Reland [pgo] Avoid introducing relocations by using private alias.

Try building clang with -DLLVM_BUILD_INSTRUMENTED=IR with a clang that contains your patch. If that's not enough, try adding -DLLVM_LINK_LLVM_DYLIB=ON. If that's not enough, I'll try to find the right set of flags from what we're using here.

Nov 15 2022, 7:47 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D137982: Reland [pgo] Avoid introducing relocations by using private alias.

This is broken with lld too:

ld.lld: error: relocation refers to a discarded section: .text._ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE19getRelocationSymbolERKNS0_12Elf_Rel_ImplIS5_Lb0EEEPKNS0_13Elf_Shdr_ImplIS5_EE
>>> defined in lib/libLLVMJITLink.a(ELF_i386.cpp.o)
>>> section group signature: _ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE19getRelocationSymbolERKNS0_12Elf_Rel_ImplIS5_Lb0EEEPKNS0_13Elf_Shdr_ImplIS5_EE
>>> prevailing definition is in lib/libLLVMObject.a(ELF.cpp.o)
>>> referenced by ELF_i386.cpp
>>>               ELF_i386.cpp.o:(__llvm_prf_data+0x18) in archive lib/libLLVMJITLink.a
Nov 15 2022, 7:31 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D137982: Reland [pgo] Avoid introducing relocations by using private alias.

This broke (at least) building clang itself with PGO (note this is using the gold linker, not lld):

ib/libLLVMObject.a(ELF.cpp.o):ELF.cpp:__profd__ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE14getStringTableERKNS0_13Elf_Shdr_ImplIS5_EENS_12function_refIFNS_5ErrorERKNS_5TwineEEEE: error: relocation refers to local symbol "" [534], which is defined in a discarded section
  section group signature: "_ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE14getStringTableERKNS0_13Elf_Shdr_ImplIS5_EENS_12function_refIFNS_5ErrorERKNS_5TwineEEEE"
  prevailing definition is from lib/libLLVMRuntimeDyld.a(RuntimeDyldELF.cpp.o)
lib/libLLVMObject.a(ELF.cpp.o):ELF.cpp:__profd__ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE8sectionsEv: error: relocation refers to local symbol "" [551], which is defined in a discarded section
  section group signature: "_ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE8sectionsEv"
  prevailing definition is from lib/libLLVMRuntimeDyld.a(RuntimeDyldELF.cpp.o)
lib/libLLVMObject.a(ELF.cpp.o):ELF.cpp:__profd__ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE10getSectionEj: error: relocation refers to local symbol "" [560], which is defined in a discarded section
  section group signature: "_ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE10getSectionEj"
  prevailing definition is from lib/libLLVMRuntimeDyld.a(RuntimeDyldELF.cpp.o)
lib/libLLVMObject.a(ELF.cpp.o):ELF.cpp:__profd__ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE13getSHNDXTableERKNS0_13Elf_Shdr_ImplIS5_EE: error: relocation refers to local symbol "" [561], which is defined in a discarded section
  section group signature: "_ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE13getSHNDXTableERKNS0_13Elf_Shdr_ImplIS5_EE"
  prevailing definition is from lib/libLLVMRuntimeDyld.a(RuntimeDyldELF.cpp.o)
lib/libLLVMObject.a(ELF.cpp.o):ELF.cpp:__profd__ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE13getSHNDXTableERKNS0_13Elf_Shdr_ImplIS5_EENS_8ArrayRefIS8_EE: error: relocation refers to local symbol "" [562], which is defined in a discarded section
  section group signature: "_ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE13getSHNDXTableERKNS0_13Elf_Shdr_ImplIS5_EENS_8ArrayRefIS8_EE"
  prevailing definition is from lib/libLLVMRuntimeDyld.a(RuntimeDyldELF.cpp.o)
lib/libLLVMObject.a(ELF.cpp.o):ELF.cpp:__profd__ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE21getRelocationTypeNameEjRNS_15SmallVectorImplIcEE: error: relocation refers to local symbol "" [590], which is defined in a discarded section 
  section group signature: "_ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE21getRelocationTypeNameEjRNS_15SmallVectorImplIcEE"
  prevailing definition is from lib/libLLVMRuntimeDyld.a(RuntimeDyldELF.cpp.o)
lib/libLLVMObject.a(ELF.cpp.o):ELF.cpp:__profd__ZN4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE6createENS_9StringRefE: error: relocation refers to local symbol "" [713], which is defined in a discarded section
  section group signature: "_ZN4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE6createENS_9StringRefE"
  prevailing definition is from lib/libLLVMRuntimeDyld.a(RuntimeDyldELF.cpp.o)
lib/libLLVMObject.a(ELF.cpp.o):ELF.cpp:__profd__ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE21getSectionStringTableENS_8ArrayRefINS0_13Elf_Shdr_ImplIS5_EEEENS_12function_refIFNS_5ErrorERKNS_5TwineEEEE: error: relocation refers to local symbol "" [749], which is defined in a discarded section
  section group signature: "_ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE21getSectionStringTableENS_8ArrayRefINS0_13Elf_Shdr_ImplIS5_EEEENS_12function_refIFNS_5ErrorERKNS_5TwineEEEE"
  prevailing definition is from lib/libLLVMRuntimeDyld.a(RuntimeDyldELF.cpp.o)
lib/libLLVMObject.a(ELF.cpp.o):ELF.cpp:__profd__ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE15getSectionIndexERKNS0_12Elf_Sym_ImplIS5_EENS_8ArrayRefIS8_EENS0_10DataRegionINS3_6detail31packed_endian_specific_integralIjLS4_1ELm1ELm1EEEEE: error: relocation refers to local symbol "" [753], which is defined in a discarded section
  section group signature: "_ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE15getSectionIndexERKNS0_12Elf_Sym_ImplIS5_EENS_8ArrayRefIS8_EENS0_10DataRegionINS3_6detail31packed_endian_specific_integralIjLS4_1ELm1ELm1EEEEE"
  prevailing definition is from lib/libLLVMRuntimeDyld.a(RuntimeDyldELF.cpp.o)

etc.

Nov 15 2022, 6:40 PM · Restricted Project, Restricted Project, Restricted Project

Nov 1 2022

glandium added a comment to D137157: InstCombine] fold mul with decremented "shl -1" factor (2nd try).

FWIW, I tested replacing CreateAdd with CreateSub on the original commit yesterday, and it fixed the issues I had.

Nov 1 2022, 2:37 PM · Restricted Project, Restricted Project

Oct 31 2022

glandium added a comment to D136533: [clang] Fix missing diagnostic of declaration use when accessing TypeDecls through typename access.

you're using the SDK libc++ with a ToT clang, which is technically not a supported combination.

Oct 31 2022, 2:24 PM · Restricted Project, Restricted Project, Restricted Project

Oct 28 2022

glandium added a comment to D136158: [AArch64] Adjust operand sequence for Add+Sub to combine more inline shift.

Reproducer: https://drive.google.com/file/d/1n7KPlKCydCgSdtnp6990Zn5_Yjbbss8L/view?usp=sharing (command in testcase/cmd)

Oct 28 2022, 1:39 AM · Restricted Project, Restricted Project
glandium added a comment to D136158: [AArch64] Adjust operand sequence for Add+Sub to combine more inline shift.

Building Firefox with LTO for any aarch64 target (linux, macos, windows) enters in some sort of infinite loop since this change (linking never ends).

Oct 28 2022, 12:35 AM · Restricted Project, Restricted Project

Oct 26 2022

glandium added a comment to D133874: [clang] Changes to produce sugared converted template arguments.

I can confirm that applying the following (derived from 849c60541b630ddf8cabf9179fa771b3f4207):

diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index a8585a6d84ad..f07c40cb6c5d 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -6774,7 +6774,7 @@ ASTContext::getCanonicalTemplateArgument(const TemplateArgument &Arg) const {
Oct 26 2022, 5:38 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D136533: [clang] Fix missing diagnostic of declaration use when accessing TypeDecls through typename access.

Nonetheless, it seems libc++ uses a deprecated declaration from it's own headers.

Oct 26 2022, 2:29 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D133874: [clang] Changes to produce sugared converted template arguments.

Reduced testcase:
cc1 command line: clang-16 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -o Unified_cpp_editor_txmgr0.o -x c++-cpp-output Unified_cpp_editor_txmgr0.ii
source file content:

class nsCycleCollectionParticipant;
class nsCycleCollectingAutoRefCnt;
extern "C" void NS_CycleCollectorSuspect3(void *,
                                          nsCycleCollectionParticipant *,
                                          nsCycleCollectingAutoRefCnt *,
                                          bool *);
class nsCycleCollectingAutoRefCnt {
public:
  typedef void Suspect(void *, nsCycleCollectionParticipant *,
                       nsCycleCollectingAutoRefCnt *, bool *);
  template <Suspect suspect = NS_CycleCollectorSuspect3>
  void incr(int *aOwner) {
    incr<suspect>(aOwner, nullptr);
  }
  template <Suspect = NS_CycleCollectorSuspect3>
  unsigned long incr(void *, nsCycleCollectionParticipant *) {}
};
class TransactionItem {
  int Release();
  nsCycleCollectingAutoRefCnt mRefCnt;
};
int TransactionItem::Release() {
  mRefCnt.incr(this, 0);
  mRefCnt.incr(0);
}
Oct 26 2022, 1:30 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D133874: [clang] Changes to produce sugared converted template arguments.

I'm running it through creduce (as well as the one for D136564. It's going to take a little while. Thank you for the revert.

Oct 26 2022, 2:09 AM · Restricted Project, Restricted Project, Restricted Project

Oct 25 2022

glandium added a comment to D136564: [clang] Instantiate NTTPs and template default arguments with sugar.

This broke building Firefox with:

In file included from Unified_cpp_dom_canvas0.cpp:65:
/tmp/gecko/dom/canvas/ClientWebGLContext.cpp:355:19: error: call to deleted function 'IdByMethod'
  const auto id = IdByMethod<MethodType, method>();
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/gecko/dom/canvas/ClientWebGLContext.cpp:438:3: note: in instantiation of function template specialization 'mozilla::ClientWebGLContext::Run<void (mozilla::HostWebGLContext::*)(unsigned long, mozilla::layers::TextureType, bool, const mozilla::webgl::SwapChainOptions &) const, &mozilla::HostWebGLContext::Present, unsigned long, const mozilla::layers::TextureType &, const bool &, mozilla::webgl::SwapChainOptions &>' requested here
  Run<RPROC(Present)>(xrFb ? xrFb->mId : 0, type, webvr, asyncOptions);
  ^
/tmp/gecko/dom/canvas/WebGLMethodDispatcher.h:20:8: note: candidate function [with MethodT = void (mozilla::HostWebGLContext::*)(unsigned long, mozilla::layers::TextureType, bool, const mozilla::webgl::SwapChainOptions &) const, Method = &mozilla::HostWebGLContext::Present] has been explicitly deleted
size_t IdByMethod() = delete;
       ^
In file included from Unified_cpp_dom_canvas0.cpp:65:
/tmp/gecko/dom/canvas/ClientWebGLContext.cpp:355:19: error: call to deleted function 'IdByMethod'
  const auto id = IdByMethod<MethodType, method>();
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/gecko/dom/canvas/ClientWebGLContext.cpp:447:3: note: in instantiation of function template specialization 'mozilla::ClientWebGLContext::Run<void (mozilla::HostWebGLContext::*)(unsigned long, mozilla::layers::TextureType, const mozilla::webgl::SwapChainOptions &) const, &mozilla::HostWebGLContext::CopyToSwapChain, unsigned long, const mozilla::layers::TextureType &, mozilla::webgl::SwapChainOptions &>' requested here
  Run<RPROC(CopyToSwapChain)>(fb ? fb->mId : 0, texType, asyncOptions);
  ^
/tmp/gecko/dom/canvas/WebGLMethodDispatcher.h:20:8: note: candidate function [with MethodT = void (mozilla::HostWebGLContext::*)(unsigned long, mozilla::layers::TextureType, const mozilla::webgl::SwapChainOptions &) const, Method = &mozilla::HostWebGLContext::CopyToSwapChain] has been explicitly deleted
size_t IdByMethod() = delete;
       ^

(etc.)

Oct 25 2022, 9:03 PM · Restricted Project, Restricted Project
glandium added a comment to D133874: [clang] Changes to produce sugared converted template arguments.

This broke building Firefox with:

In file included from Unified_cpp_editor_txmgr0.cpp:2:
In file included from /tmp/gecko/editor/txmgr/TransactionItem.cpp:6:
In file included from /tmp/gecko/editor/txmgr/TransactionItem.h:9:
In file included from /tmp/gecko/obj-x86_64-pc-linux-gnu/dist/include/nsCOMPtr.h:31:
In file included from /tmp/gecko/obj-x86_64-pc-linux-gnu/dist/include/nsISupportsUtils.h:16:
/tmp/gecko/obj-x86_64-pc-linux-gnu/dist/include/nsISupportsImpl.h:238:31: error: definition with same mangled name '_ZN27nsCycleCollectingAutoRefCnt4incrIXadL_Z25NS_CycleCollectorSuspect3EEEEmPvP28nsCycleCollectionParticipant' as another definition
  MOZ_ALWAYS_INLINE uintptr_t incr(void* aOwner,
                              ^
/tmp/gecko/obj-x86_64-pc-linux-gnu/dist/include/nsISupportsImpl.h:238:31: note: previous definition is here
/tmp/gecko/obj-x86_64-pc-linux-gnu/dist/include/nsISupportsImpl.h:266:31: error: definition with same mangled name '_ZN27nsCycleCollectingAutoRefCnt4decrIXadL_Z25NS_CycleCollectorSuspect3EEEEmPvP28nsCycleCollectionParticipantPb' as another definition
  MOZ_ALWAYS_INLINE uintptr_t decr(void* aOwner,
                              ^
/tmp/gecko/obj-x86_64-pc-linux-gnu/dist/include/nsISupportsImpl.h:266:31: note: previous definition is here
2 errors generated.
Oct 25 2022, 9:03 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D136533: [clang] Fix missing diagnostic of declaration use when accessing TypeDecls through typename access.

(And specifically, FuzzerFork.cpp doesn't use any of those declared things. Its only sin is to #include <fstream>, which happens to have /some/ methods (std::filesystem-related) only available on macos 10.15+.)

Oct 25 2022, 7:15 PM · Restricted Project, Restricted Project, Restricted Project
glandium added a comment to D136533: [clang] Fix missing diagnostic of declaration use when accessing TypeDecls through typename access.

In either case, this seems to be an issue with libc++ that is out there in the wild.

Oct 25 2022, 7:13 PM · Restricted Project, Restricted Project, Restricted Project

Oct 24 2022

glandium added a comment to D136533: [clang] Fix missing diagnostic of declaration use when accessing TypeDecls through typename access.

This breaks compiling many things on macOS, including compiler-rt:

/tmp/llvm2/obj/bin/clang++ --target=aarch64-apple-darwin  -I/tmp/llvm2/compiler-rt/lib/fuzzer/../../include -Wall -Wno-unused-parameter -O3 -DNDEBUG -arch arm64 -isysroot /tmp/MacOSX11.3.sdk -stdlib=libc++ -mmacosx-version-min=10.10 -isysroot /tmp/MacOSX11.3.sdk -fPIC -fno-builtin -fno-exceptions -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -g -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -fno-omit-frame-pointer -std=c++17 -MD -MT lib/fuzzer/CMakeFiles/RTfuzzer.osx.dir/FuzzerFork.cpp.o -MF lib/fuzzer/CMakeFiles/RTfuzzer.osx.dir/FuzzerFork.cpp.o.d -o lib/fuzzer/CMakeFiles/RTfuzzer.osx.dir/FuzzerFork.cpp.o -c /tmp/llvm2/compiler-rt/lib/fuzzer/FuzzerFork.cpp
In file included from /tmp/llvm2/compiler-rt/lib/fuzzer/FuzzerFork.cpp:11:
In file included from /tmp/llvm2/compiler-rt/lib/fuzzer/FuzzerCommand.h:15:
In file included from /tmp/llvm2/compiler-rt/lib/fuzzer/FuzzerDefs.h:18:
In file included from /tmp/MacOSX11.3.sdk/usr/include/c++/v1/memory:667:
/tmp/MacOSX11.3.sdk/usr/include/c++/v1/type_traits:1672:66: error: 'type' is unavailable: introduced in macOS 10.15
    typedef _LIBCPP_NODEBUG_TYPE typename remove_reference<_Tp>::type _Up;
                                                                 ^
/tmp/MacOSX11.3.sdk/usr/include/c++/v1/filesystem:603:47: note: in instantiation of template class 'std::decay<std::filesystem::path>' requested here
template <class _Source, class _DS = typename decay<_Source>::type,
                                              ^
/tmp/MacOSX11.3.sdk/usr/include/c++/v1/filesystem:648:31: note: in instantiation of default argument for '__is_pathable_char_array<std::filesystem::path>' required here
          bool _IsCharIterT = __is_pathable_char_array<_Tp>::value,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/MacOSX11.3.sdk/usr/include/c++/v1/filesystem:741:26: note: in instantiation of default argument for '__is_pathable<std::filesystem::path, false>' required here
      typename enable_if<__is_pathable<_SourceOrIter>::value, _Tp>::type;
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/MacOSX11.3.sdk/usr/include/c++/v1/filesystem:861:29: note: in instantiation of template type alias '_EnableIfPathable' requested here
  _LIBCPP_INLINE_VISIBILITY _EnableIfPathable<_Source>
                            ^
/tmp/MacOSX11.3.sdk/usr/include/c++/v1/filesystem:965:19: note: while substituting deduced template arguments into function template 'operator/=' [with _Source = path]
    return (*this /= __replacement);
                  ^
/tmp/MacOSX11.3.sdk/usr/include/c++/v1/filesystem:738:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
Oct 24 2022, 10:10 PM · Restricted Project, Restricted Project, Restricted Project

Oct 22 2022

glandium added a comment to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

@nikic can you push this for me?

Oct 22 2022, 3:51 PM · Restricted Project, Restricted Project

Oct 21 2022

glandium retitled D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved. from [InstCombine] Bail out of casting calls when a conversion to byval is involved. to [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..
Oct 21 2022, 1:54 PM · Restricted Project, Restricted Project
glandium updated the diff for D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

Removed -mtriple ; Restricted conversions from byval as well.

Oct 21 2022, 1:54 PM · Restricted Project, Restricted Project
glandium added inline comments to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..
Oct 21 2022, 1:43 PM · Restricted Project, Restricted Project

Oct 20 2022

glandium updated the diff for D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

Removed datalayout/Ran update_test_checks

Oct 20 2022, 2:50 PM · Restricted Project, Restricted Project
glandium added inline comments to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..
Oct 20 2022, 2:28 PM · Restricted Project, Restricted Project
glandium added inline comments to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..
Oct 20 2022, 2:04 PM · Restricted Project, Restricted Project
glandium added inline comments to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..
Oct 20 2022, 1:55 PM · Restricted Project, Restricted Project

Oct 19 2022

glandium abandoned D135755: [LTO][Legacy] Use the same defaults as non-legacy LTO.
Oct 19 2022, 7:10 PM · Restricted Project, Restricted Project
glandium added a comment to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

Would you reconsider this patch? Sure, it doesn't address the issue generally, but it does fix the cases that were actively broken by 6c8adc5.

Oct 19 2022, 5:21 PM · Restricted Project, Restricted Project

Oct 12 2022

glandium updated the summary of D135755: [LTO][Legacy] Use the same defaults as non-legacy LTO.
Oct 12 2022, 5:24 PM · Restricted Project, Restricted Project
glandium updated the summary of D135755: [LTO][Legacy] Use the same defaults as non-legacy LTO.
Oct 12 2022, 5:24 PM · Restricted Project, Restricted Project
glandium updated the diff for D135755: [LTO][Legacy] Use the same defaults as non-legacy LTO.

Added a null check.

Oct 12 2022, 5:23 PM · Restricted Project, Restricted Project
glandium added a comment to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

Example for the case @efriedma mentions: https://llvm.godbolt.org/z/oPzWv9sr4

Oct 12 2022, 4:47 PM · Restricted Project, Restricted Project
glandium added a comment to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

From a quick try, the same is true for argument promotion (https://llvm.godbolt.org/z/8We7dvYvT), we mix up the levels of indirection.

Oct 12 2022, 3:18 PM · Restricted Project, Restricted Project
glandium added inline comments to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..
Oct 12 2022, 2:12 PM · Restricted Project, Restricted Project
glandium requested review of D135755: [LTO][Legacy] Use the same defaults as non-legacy LTO.
Oct 12 2022, 1:59 AM · Restricted Project, Restricted Project
glandium added a comment to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

It looks like it's not a problem:

cat <<EOF | opt --O3 -S
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"
target triple = "i686-unknown-linux-gnu"
Oct 12 2022, 1:31 AM · Restricted Project, Restricted Project

Oct 11 2022

glandium updated the diff for D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

Added missing datalayout and target.

Oct 11 2022, 8:22 PM · Restricted Project, Restricted Project
glandium updated the diff for D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

Adjustment to the comment.

Oct 11 2022, 8:19 PM · Restricted Project, Restricted Project
glandium updated the diff for D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

InstCombine test.

Oct 11 2022, 8:17 PM · Restricted Project, Restricted Project
glandium added inline comments to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..
Oct 11 2022, 8:14 PM · Restricted Project, Restricted Project
glandium added inline comments to D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..
Oct 11 2022, 8:03 PM · Restricted Project, Restricted Project
glandium updated the diff for D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

Refreshed test case to match what's in the issue.

Oct 11 2022, 7:48 PM · Restricted Project, Restricted Project
glandium updated the diff for D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..

Added testcase.

Oct 11 2022, 7:45 PM · Restricted Project, Restricted Project
glandium requested review of D135738: [InstCombine] Bail out of casting calls when a conversion from/to byval is involved..
Oct 11 2022, 6:39 PM · Restricted Project, Restricted Project

Oct 6 2022

glandium added a comment to D134616: [CodeView] Avoid NULL deref of Scope.

Thank you. Could you publish this for me (I don't have commit access)?

Oct 6 2022, 4:42 PM · Restricted Project, Restricted Project
glandium updated the diff for D134616: [CodeView] Avoid NULL deref of Scope.

Adding a testcase that crashes without the patch and passes with the patch.

Oct 6 2022, 4:01 PM · Restricted Project, Restricted Project

Oct 3 2022

glandium added a comment to D134616: [CodeView] Avoid NULL deref of Scope.

@rnk ping

Oct 3 2022, 2:22 PM · Restricted Project, Restricted Project

Sep 25 2022

glandium added reviewers for D134616: [CodeView] Avoid NULL deref of Scope: rnk, akhuang, bwyma, ykhatav.
Sep 25 2022, 2:49 PM · Restricted Project, Restricted Project
glandium requested review of D134616: [CodeView] Avoid NULL deref of Scope.
Sep 25 2022, 2:47 PM · Restricted Project, Restricted Project

Sep 23 2022

glandium added a comment to D131465: C++/ObjC++: switch to gnu++17 as the default standard.

I think both driver share the logic for MSVC version detection, which checks for cl.exe on PATH and looks at the registry if that fails.

I think we should try to lean towards making this policy easy to document and communicate to users, and that means our rules need to be concise. I worry that different defaults will surprise cross-platform projects ("hey, my code built with on clang Linux, but not Windows with clang-cl, why is that, let's debug..."). A simple rule like "clang 16.0 raised the default C++ standard version to 17, except on PS4" seems preferable.

Sep 23 2022, 1:51 PM · Restricted Project, Restricted Project, Restricted Project

Sep 20 2022

glandium added a comment to D131465: C++/ObjC++: switch to gnu++17 as the default standard.

This didn't change the default for msvc targets, was that expected?

Sep 20 2022, 11:31 PM · Restricted Project, Restricted Project, Restricted Project

Aug 22 2022

glandium added a comment to D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities.

FWIW, it also broke compiler-rt standalone builds:

CMake Error at lib/builtins/CMakeLists.txt:702 (add_security_warnings):
  Unknown CMake command "add_security_warnings".
Aug 22 2022, 5:18 PM · Restricted Project, Restricted Project

Aug 18 2022

glandium abandoned D131937: [compiler-rt] Always use C++17 when building compiler-rt standalone.

Thank you

Aug 18 2022, 4:36 PM · Restricted Project, Restricted Project

Aug 17 2022

glandium updated subscribers of D131937: [compiler-rt] Always use C++17 when building compiler-rt standalone.

@smeenai I see you pushed something similar in 5737f6a527d782e6577e5cc1e0c743df2c98546a, but missing the config-ix.cmake part, would you mind pushing that cleanup too?

Aug 17 2022, 8:44 PM · Restricted Project, Restricted Project

Aug 15 2022

glandium added a comment to D107799: [CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux.

@MaskRay This Dockerfile reproduces it with Debian testing: https://gist.github.com/glandium/6c130dee608f9585b425c4a40a084d27

Aug 15 2022, 9:39 PM · Restricted Project, Restricted Project, Restricted Project
glandium retitled D131937: [compiler-rt] Always use C++17 when building compiler-rt standalone from [compiler-rt] always use C++17 when building compiler-rt standalone to [compiler-rt] Always use C++17 when building compiler-rt standalone.
Aug 15 2022, 7:55 PM · Restricted Project, Restricted Project
glandium retitled D131937: [compiler-rt] Always use C++17 when building compiler-rt standalone from Always use C++17 when building compiler-rt standalone to [compiler-rt] always use C++17 when building compiler-rt standalone.
Aug 15 2022, 7:55 PM · Restricted Project, Restricted Project
glandium requested review of D131937: [compiler-rt] Always use C++17 when building compiler-rt standalone.
Aug 15 2022, 7:52 PM · Restricted Project, Restricted Project

Aug 14 2022

glandium added a comment to D130479: [ORC_RT][COFF] Initial platform support for COFF/x86_64..

For what it's worth, this break building compiler-rt with clang-cl:

In file included from /builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.cpp:16:
In file included from /builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.h:17:
In file included from /builds/worker/fetches/llvm-project/compiler-rt/lib/orc/executor_address.h:20:
/builds/worker/fetches/llvm-project/compiler-rt/lib/orc/simple_packed_serialization.h(403,58): error: no member named 'string_view' 
in namespace 'std'
template <> class SPSSerializationTraits<SPSString, std::string_view> {
                                                    ~~~~~^
/builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.cpp(109,21): error: no type named 'string_view' in namespace '
std'
  void *dlopen(std::string_view Name, int Mode);
               ~~~~~^
/builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.cpp(111,34): error: no type named 'string_view' in namespace '
std'
  void *dlsym(void *Header, std::string_view Symbol);
                            ~~~~~^
/builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.cpp(118,34): error: no member named 'string_view' in namespace
 'std'
      std::vector<std::pair<std::string_view, ExecutorAddrRange>> Secs,
                            ~~~~~^
/builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.cpp(122,34): error: no member named 'string_view' in namespace
 'std'
      std::vector<std::pair<std::string_view, ExecutorAddrRange>> Secs);
                            ~~~~~^
/builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.cpp(135,36): error: no type named 'string_view' in namespace '
std'
  Expected<void *> dlopenImpl(std::string_view Path, int Mode);
                              ~~~~~^
/builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.cpp(143,46): error: no type named 'string_view' in namespace '
std'
  JITDylibState *getJITDylibStateByName(std::string_view Path);
                                        ~~~~~^
/builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.cpp(145,54): error: no type named 'string_view' in namespace '
std'
                                                std::string_view Symbol);
                                                ~~~~~^
/builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.cpp(156,27): error: no member named 'string_view' in namespace
 'std'
  std::unordered_map<std::string_view, void *> JDNameToHeader;
                     ~~~~~^
/builds/worker/fetches/llvm-project/compiler-rt/lib/orc/coff_platform.cpp(173,55): error: no type named 'string_view' in namespace '
std'

etc.

Aug 14 2022, 2:08 PM · Restricted Project, Restricted Project, Restricted Project

Aug 11 2022

glandium added a comment to D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values.

Having looked around in the Firefox codebase for cases that now fail to build because of this, and looking at the clarification in DR2338, I wonder if enums in extern "C" sections should be treated as if they had an explicit type of int as if it were e.g. enum Foo: int { ... }.

Aug 11 2022, 12:24 AM · Restricted Project, Restricted Project

Aug 10 2022

glandium added a comment to D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values.

Also not caught: a cast of 0 when 0 is not a valid value in the enum.

Aug 10 2022, 9:19 PM · Restricted Project, Restricted Project
glandium added a comment to D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values.
Aug 10 2022, 9:08 PM · Restricted Project, Restricted Project