Page MenuHomePhabricator

MaskRay (Fangrui Song)
UserAdministrator

Projects

User Details

User Since
Dec 30 2016, 3:24 PM (282 w, 5 h)
Roles
Administrator

Recent Activity

Today

MaskRay committed rG068b8af7961c: [ARM][AArch64] Change -mharden-sls= to use err_drv_unsupported_option_argument (authored by MaskRay).
[ARM][AArch64] Change -mharden-sls= to use err_drv_unsupported_option_argument
Fri, May 27, 10:04 PM · Restricted Project, Restricted Project
MaskRay closed D126511: [ARM][AArch64] Change -mharden-sls= to use err_drv_unsupported_option_argument.
Fri, May 27, 10:03 PM · Restricted Project, Restricted Project
MaskRay accepted D120540: [Driver] Enable to use C++20 modules standalone by -fcxx-modules.
Fri, May 27, 2:13 PM · Restricted Project, Restricted Project
MaskRay committed rG03a09079d6cd: [CMake] Make FindLibEdit.cmake more robust (authored by upsj).
[CMake] Make FindLibEdit.cmake more robust
Fri, May 27, 1:07 PM · Restricted Project
MaskRay closed D126450: [cmake] make FindLibEdit.cmake more robust.
Fri, May 27, 1:07 PM · Restricted Project, Restricted Project
Herald added a project to D96348: [sanitizers] Fix interception of GLibc regexec: Restricted Project.

The underlying issue is that GLibc's dlsym(RTLD_NEXT, ...) appears to always return the oldest versioned symbol instead of the default. This means it does not match the behaviour of dlsym(RTLD_DEFAULT, ...) or the behaviour documented in the manpage.

Fri, May 27, 12:49 PM · Restricted Project, Restricted Project
MaskRay accepted D126543: [bazel] BLAKE3: Adopt aarch64 and x86_64..

Looks great!

Fri, May 27, 11:50 AM · Restricted Project, Restricted Project

Yesterday

MaskRay added inline comments to D124753: [HLSL] Set main as default entry..
Thu, May 26, 6:18 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D124751: [HLSL] Support -E option for HLSL..
Thu, May 26, 6:15 PM · Restricted Project, Restricted Project
MaskRay committed rGcef377d75df4: [RISCV] Simplify code after D125905 (authored by MaskRay).
[RISCV] Simplify code after D125905
Thu, May 26, 6:14 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D125905: [RISCV] Fix state persistence bugs (PR55548).
Thu, May 26, 6:11 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D126192: [Driver] Support linking with lld for target AVR.
Thu, May 26, 5:47 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D126192: [Driver] Support linking with lld for target AVR.
Thu, May 26, 5:45 PM · Restricted Project, Restricted Project
MaskRay accepted D126450: [cmake] make FindLibEdit.cmake more robust.

LGTM. @paulkirth can you whether this helps your build?

Thu, May 26, 5:42 PM · Restricted Project, Restricted Project
MaskRay requested review of D126511: [ARM][AArch64] Change -mharden-sls= to use err_drv_unsupported_option_argument.
Thu, May 26, 5:34 PM · Restricted Project, Restricted Project
MaskRay accepted D126484: [LLD][ELF] Drop the string null terminator from the hash in splitStrings.

Thanks for looking into the performance:)

Thu, May 26, 4:53 PM · Restricted Project, Restricted Project
Herald added a project to D81404: [AArch64] Add clang command line support for -mharden-sls=: Restricted Project.

The convention is to use err_drv_unsupported_option_argument instead of adding a new diagnostic kind.

Thu, May 26, 4:51 PM · Restricted Project, Restricted Project
MaskRay accepted D126458: [Support] Reduce allocations in parallelForEach with move.
Thu, May 26, 4:48 PM · Restricted Project, Restricted Project
MaskRay committed rG056dec5dc821: [Driver][test] Change -target i386-unknown-linux-gnu to --target=i386 and… (authored by MaskRay).
[Driver][test] Change -target i386-unknown-linux-gnu to --target=i386 and…
Thu, May 26, 2:41 PM · Restricted Project, Restricted Project
MaskRay added a comment to D126137: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]`.

gcc has renamed indirect-branch to indirect-jmp.

Thu, May 26, 2:32 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D126137: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]`.
Thu, May 26, 2:21 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay added a comment to D126137: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]`.

[X86] Add support for -mharden-sls=all

Thu, May 26, 1:59 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay requested changes to D126137: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]`.
Thu, May 26, 1:57 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D126137: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]`.
Thu, May 26, 1:55 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay accepted D126289: [Clang][Driver] Fix include paths for `--sysroot /` on Linux.
Thu, May 26, 1:51 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D126137: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]`.
Thu, May 26, 1:28 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D126137: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]`.
Thu, May 26, 1:25 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D126421: ADT/ArrayRef: Add makeMutableArrayRef overloads.
Thu, May 26, 11:45 AM · Restricted Project, Restricted Project
MaskRay committed rG9ee15bba4744: [MC] Lower case the first letter of EmitCOFF* EmitWin* EmitCV*. NFC (authored by MaskRay).
[MC] Lower case the first letter of EmitCOFF* EmitWin* EmitCV*. NFC
Thu, May 26, 12:14 AM · Restricted Project, Restricted Project
MaskRay committed rGa1ec3c5a8885: [scudo] Link against libatomic on all MIPS targets (authored by glaubitz).
[scudo] Link against libatomic on all MIPS targets
Thu, May 26, 12:00 AM · Restricted Project, Restricted Project
MaskRay closed D126418: [scudo] Link against libatomic on all MIPS targets.
Thu, May 26, 12:00 AM · Restricted Project, Restricted Project

Wed, May 25

MaskRay requested changes to D126391: MIPS: compiler-rt/scudo requires atomic.
Wed, May 25, 11:58 PM · Restricted Project, Restricted Project
MaskRay accepted D126340: [clang] add option -mdefault-visibility-export-mapping.
Wed, May 25, 11:33 PM · Restricted Project
MaskRay added a comment to D126424: compiler-rt/cpu_model: Raise constructor priority to align with GCC.

#if __has_attribute(constructor) is unneeded. All supported GCC/Clang supports #if __has_attribute(constructor).

Ok, the comment seemed to indicate that this was being done for MSVC compatibility. Is building compiler-rt with MSVC no longer supported?

There is #define __has_attribute(attr) 0

I'm sorry, I'm confused what change you'd like me to make here. The __has_attribute was there before. Could you elaborate?

Wed, May 25, 11:03 PM · Restricted Project, Restricted Project
MaskRay added a comment to D126424: compiler-rt/cpu_model: Raise constructor priority to align with GCC.

#if __has_attribute(constructor) is unneeded. All supported GCC/Clang supports #if __has_attribute(constructor).

Ok, the comment seemed to indicate that this was being done for MSVC compatibility. Is building compiler-rt with MSVC no longer supported?

Wed, May 25, 9:48 PM · Restricted Project, Restricted Project
MaskRay added a comment to D126424: compiler-rt/cpu_model: Raise constructor priority to align with GCC.

#if __has_attribute(constructor) is unneeded. All supported GCC/Clang supports #if __has_attribute(constructor).

Wed, May 25, 9:27 PM · Restricted Project, Restricted Project
MaskRay accepted D126342: [libunwind] Factor out sigreturn check condition. NFC.
Wed, May 25, 9:24 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D126289: [Clang][Driver] Fix include paths for `--sysroot /` on Linux.
Wed, May 25, 5:03 PM · Restricted Project, Restricted Project
MaskRay added a comment to D126424: compiler-rt/cpu_model: Raise constructor priority to align with GCC.

constructor(90) is more common.

Wed, May 25, 3:19 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D126289: [Clang][Driver] Fix include paths for `--sysroot /` on Linux.
Wed, May 25, 3:08 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D126421: ADT/ArrayRef: Add makeMutableArrayRef overloads.
Wed, May 25, 2:06 PM · Restricted Project, Restricted Project
MaskRay accepted D126418: [scudo] Link against libatomic on all MIPS targets.
Wed, May 25, 2:00 PM · Restricted Project, Restricted Project
MaskRay accepted D126417: [iwyu] Handle regressions in libLLVM header include.

LGTM.

Wed, May 25, 2:00 PM · Restricted Project, Restricted Project
MaskRay added a comment to D126340: [clang] add option -mdefault-visibility-export-mapping.

docs/ClangCommandLineReference.rst is generated from HelpText. Use UsersManual.rst if you want to provide additional information. Please ensure --help has sufficient information about the allowed values.

Wed, May 25, 1:34 PM · Restricted Project
MaskRay added a comment to D126391: MIPS: compiler-rt/scudo requires atomic.

The target platform instead of the host platform should be tested. We may need something like COMPILER_RT_DEFAULT_TARGET_ARCH.

Wed, May 25, 9:46 AM · Restricted Project, Restricted Project
MaskRay committed rG9da89651a8d5: [llvm-objcopy][ObjectYAML][mips] Add MIPS specific ELF section indexes (authored by argentite).
[llvm-objcopy][ObjectYAML][mips] Add MIPS specific ELF section indexes
Wed, May 25, 9:01 AM · Restricted Project, Restricted Project
MaskRay closed D123902: [llvm-objcopy][ObjectYAML][mips] Add MIPS specific ELF section indexes.
Wed, May 25, 9:01 AM · Restricted Project, Restricted Project
MaskRay accepted D123902: [llvm-objcopy][ObjectYAML][mips] Add MIPS specific ELF section indexes.

This is my first patch. I don't have push access. Can you push it for me if nobody has any other comments?

Wed, May 25, 8:56 AM · Restricted Project, Restricted Project

Tue, May 24

MaskRay added inline comments to D126343: [libunwind] Use process_vm_readv to avoid potential segfaults.
Tue, May 24, 11:05 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay accepted D126343: [libunwind] Use process_vm_readv to avoid potential segfaults.

LGTM, but hope @rprichard can verify this.

Tue, May 24, 11:02 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay accepted D100504: [libc++abi][AIX] add personality and helper functions for the state table EH.

but you need some from #libc_abi

Tue, May 24, 10:54 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D126340: [clang] add option -mdefault-visibility-export-mapping.
Tue, May 24, 9:46 PM · Restricted Project
MaskRay added a comment to D118490: [lld][ELF] add .note sections from linker scripts as SHT_NOTE.

(there was similar feedback on the corresponding mold bug: https://github.com/rui314/mold/issues/505)

Tue, May 24, 11:20 AM · Restricted Project, Restricted Project

Mon, May 23

MaskRay accepted D126265: [Hexagon] Fix test on OpenBSD.

LGTM.

Mon, May 23, 8:05 PM · Restricted Project, Restricted Project
MaskRay accepted D126263: [Sanitizers][Darwin] Replace SANITIZER_MAC with SANITIZER_APPLE in source files.
Mon, May 23, 7:18 PM · Restricted Project, Restricted Project
MaskRay added a comment to D125862: [clang][driver] Add gcc-toolset/devtoolset 12 to prefixes.

Because of TargetTriple.getOS() == llvm::Triple::Linux, you need to guard the unittest under a similar check.

Mon, May 23, 3:35 PM · Restricted Project, Restricted Project
MaskRay removed a reviewer for D126226: [OpenMP] Add `-Xoffload-linker` to forward input to the device linker: MaskRay.
Mon, May 23, 2:40 PM · Restricted Project, Restricted Project
MaskRay added a comment to D126226: [OpenMP] Add `-Xoffload-linker` to forward input to the device linker.

It's better to avoid JoinedAndSeparate for new options. It is for --xxx val and --xxxval but not intended for the option this patch will add.

I'm not sure I understand your argument. The two cases where I see JoinedAndSeparate are used right now (-Xarch_ and -plugin-arg) both are using it for the purposes similar to this patch.
I also do not quite see how JoinedAndSeparate is applicable to --xxxval/--xxx val.
Could you elaborate, please?

Consider something like -Xoffload-linker-triple <triple>=<arg>

That could work.

We keep running into the same old underlying issue that we do not have a good way to name/reference specific parts of the compilation pipeline. -Xfoo used to work OK for the linear 'standard' compilation pipeline, but these days when compilation grew from a simple linear pipe it's no longer adequate and we need to extend it.

Speaking of triples. I think using triple as the selector is insufficient for general offloading use. We may have offload variants that would use the same triple, but would be compiled using their own pipeline. E.g. the GPU binaries for sm_60 and sm_80 GPUs will use the same nvptx64 triple, but would presumably be lined with different linker instances and may need different options. My understanding is that AMDGPU has even more detailed offload variants (same triple, same GPU arch, different features). I don't know whether it's applicable to OpenMP, though. I think it is. IIRC OpenMP has a way to specialize offload to particular GPU variant and that would probably give you multiple offload targets, all with the same triple.

Mon, May 23, 2:40 PM · Restricted Project, Restricted Project
MaskRay accepted D126101: [MCDisassembler] Disambiguate Size parameter in tryAddingSymbolicOperand().

Perhaps wait a day or so in case others have opinions.

Mon, May 23, 1:49 PM · Restricted Project, Restricted Project
MaskRay added a comment to D126226: [OpenMP] Add `-Xoffload-linker` to forward input to the device linker.

IIRC there is no built-in way supporting multiple (but fixed number of) values for an option (e.g. -Xoffload-linker-<triple> <arg>). In D105330 (llvm-nm option refactoring) I used a hack to support -s __DATA __data.
The multiple-value support for OptTable does not allow positional arguments after the option.

Mon, May 23, 1:11 PM · Restricted Project, Restricted Project
MaskRay requested changes to D126226: [OpenMP] Add `-Xoffload-linker` to forward input to the device linker.

It's better to avoid JoinedAndSeparate for new options. It is for --xxx val and --xxxval but not intended for the option this patch will add.

Mon, May 23, 12:51 PM · Restricted Project, Restricted Project
MaskRay committed rG224a8653c98e: [llvm-nm][docs] Document -W and -U (authored by MaskRay).
[llvm-nm][docs] Document -W and -U
Mon, May 23, 9:59 AM · Restricted Project, Restricted Project
MaskRay closed D126133: [llvm-nm][docs] Document -W and -U.
Mon, May 23, 9:59 AM · Restricted Project, Restricted Project

Sat, May 21

MaskRay accepted D125604: [FileCheck] Catch missspelled directives..

LGTM. Thanks for pinging the relevant folks on individual tests. You can push the fixes yourself before landing this patch.

Sat, May 21, 4:09 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
MaskRay requested review of D126133: [llvm-nm][docs] Document -W and -U.
Sat, May 21, 4:01 PM · Restricted Project, Restricted Project
MaskRay accepted D124306: [UpdateTestChecks] Auto-generate stub bodies for unused prefixes.
Sat, May 21, 3:03 PM · Restricted Project, Restricted Project
MaskRay added a comment to D124751: [HLSL] Support -E option for HLSL..

Is there a specification or reference implementation stating that -E is used?

Option<["--", "/", "-"], "E",

Do you need the prefix --? You may define something like CLFlag. I have missed previous patches, but if / options are not necessary, removing them will be the best to avoid collision with filenames starting with /.

Unfortunately, '/' is necessary. dxc allow both '-' and '/' like 'CLFlag'.
Remove '/' means existing customers may need to change their command line to compile hlsl.
And add '--' feels not hurt anyone, that's why I choose to add '--' to work-around the conflict.

Sat, May 21, 2:59 PM · Restricted Project, Restricted Project
MaskRay requested changes to D124770: [Sanitizers] Guard FP_XSTATE_MAGIC1 usage by GLIBC version.

FP_XSTATE_MAGIC1 is only available on glibc 2.27 and upwards

Sat, May 21, 2:52 PM · Restricted Project, Restricted Project
MaskRay requested changes to D124779: [Sanitizers] Fix compilation on musl 32bit.
Sat, May 21, 2:47 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D125979: [ADT] add LockFreeDataPool class..
Sat, May 21, 2:46 PM · Restricted Project, Restricted Project
MaskRay added a comment to D125979: [ADT] add LockFreeDataPool class..

The name is not descriptive. It misses the important words about "hash map". ConcurrentHashMap may be a better name.

Sat, May 21, 2:39 PM · Restricted Project, Restricted Project
MaskRay requested changes to D126121: Remove undefined behavior in count.c test program [NFC].
Sat, May 21, 11:11 AM · Restricted Project, Restricted Project
MaskRay added inline comments to D125847: LTO: Decide upfront whether to use opaque/non-opaque pointer types.
Sat, May 21, 11:10 AM · Restricted Project, Restricted Project, Restricted Project
MaskRay added 1 blocking reviewer(s) for D125847: LTO: Decide upfront whether to use opaque/non-opaque pointer types: MaskRay.
Sat, May 21, 11:10 AM · Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D126046: [lld-macho] Support -non_global_symbols_strip_list, -non_global_symbols_no_strip_list, -x.
Sat, May 21, 11:08 AM · Restricted Project, Restricted Project, Restricted Project
MaskRay added a comment to D126121: Remove undefined behavior in count.c test program [NFC].

Where is the undefined behavior? size_t is unsigned long long on 32-bit ELF platforms. You need %zu.

Sat, May 21, 10:59 AM · Restricted Project, Restricted Project
MaskRay requested changes to D87219: [ELF] Merge .openbsd.randomdata.* sections into a single .openbsd.randomdata section when linking.
Sat, May 21, 10:35 AM · Restricted Project, Restricted Project
MaskRay added a comment to D126101: [MCDisassembler] Disambiguate Size parameter in tryAddingSymbolicOperand().

Fix MCSymbolizer::tryAddingSymbolicOperand() interface

Sat, May 21, 10:34 AM · Restricted Project, Restricted Project
MaskRay added inline comments to D126101: [MCDisassembler] Disambiguate Size parameter in tryAddingSymbolicOperand().
Sat, May 21, 10:33 AM · Restricted Project, Restricted Project
MaskRay added a comment to D126101: [MCDisassembler] Disambiguate Size parameter in tryAddingSymbolicOperand().

However, for proper symbolic disassembly on X86 we need to know both sizes.

Sat, May 21, 10:31 AM · Restricted Project, Restricted Project
MaskRay added inline comments to D126101: [MCDisassembler] Disambiguate Size parameter in tryAddingSymbolicOperand().
Sat, May 21, 10:30 AM · Restricted Project, Restricted Project

Fri, May 20

MaskRay accepted D126072: [lld-macho] Stop crash when emitting personalities with -dead_strip.
Fri, May 20, 2:36 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D126072: [lld-macho] Stop crash when emitting personalities with -dead_strip.
Fri, May 20, 1:34 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay accepted D125905: [RISCV] Fix state persistence bugs (PR55548).
Fri, May 20, 12:04 PM · Restricted Project, Restricted Project
MaskRay added a comment to D126079: [NFC][LLVM] Merge shouldExpandAtomic*InIR into shouldExpandAtomicInstInIR.

Overloaded virtual functions seem more difficult to read and are more error-prone. Having distinct function names can be useful as people searching code can find the relevant one easily.

Fri, May 20, 11:45 AM · Restricted Project, Restricted Project
MaskRay added a comment to D125979: [ADT] add LockFreeDataPool class..

@MaskRay, can you review this? I think you have been thinking the most about how to parallelize linkers, and what fundamental data structures are most important.

Fri, May 20, 11:21 AM · Restricted Project, Restricted Project
MaskRay accepted D126017: [libunwind][ci][AIX] Add libunwind to buildbot CI.
Fri, May 20, 10:32 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Thu, May 19

MaskRay added a comment to D125036: [RISCV] Alignment relaxation.

While I think there are still significant problems needing to address, it may work with quite a few application. It'd be nice if folks can check how this patch works without -mno-relax.

Thu, May 19, 8:10 PM · Restricted Project, Restricted Project
MaskRay requested changes to D125036: [RISCV] Alignment relaxation.
Thu, May 19, 8:08 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D125036: [RISCV] Alignment relaxation.
Thu, May 19, 8:07 PM · Restricted Project, Restricted Project
MaskRay added a comment to D125036: [RISCV] Alignment relaxation.

On lld/ELF/Relocations.cpp:1439, R_RELAX_HINT should not trigger sym.hasDirectReloc = true;, otherwise an ifunc may unnecessarily be converted to a canonical PLT. You may read *-ifunc-nonpreemptible*.s tests for what they do. I have some notes on https://maskray.me/blog/2021-01-18-gnu-indirect-function#address-significance

Thu, May 19, 8:04 PM · Restricted Project, Restricted Project
MaskRay accepted D125862: [clang][driver] Add gcc-toolset/devtoolset 12 to prefixes.

Thanks!

Thu, May 19, 6:49 PM · Restricted Project, Restricted Project
MaskRay accepted D125901: [safestack] Fix Mmap on FreeBSD AArch64.

I think placing the OS before && is more common.

Thu, May 19, 6:46 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D100504: [libc++abi][AIX] add personality and helper functions for the state table EH.
Thu, May 19, 4:51 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay added inline comments to D126017: [libunwind][ci][AIX] Add libunwind to buildbot CI.
Thu, May 19, 1:59 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
MaskRay added a comment to D126017: [libunwind][ci][AIX] Add libunwind to buildbot CI.

Seems fine to me for libunwind, but I don't know the build bot setup enough. I will give a LGTM if you still lack an approval to make #libunwind green :)

Thu, May 19, 1:58 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
MaskRay accepted D124836: [AArch64] Add support for -fzero-call-used-regs.
Thu, May 19, 12:47 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay accepted D125436: [lld][test] Delete empty Unit test directory.
Thu, May 19, 11:56 AM · Restricted Project, Restricted Project
MaskRay added inline comments to D125847: LTO: Decide upfront whether to use opaque/non-opaque pointer types.
Thu, May 19, 12:21 AM · Restricted Project, Restricted Project, Restricted Project

Wed, May 18

MaskRay added inline comments to D125862: [clang][driver] Add gcc-toolset/devtoolset 12 to prefixes.
Wed, May 18, 11:15 PM · Restricted Project, Restricted Project