Page MenuHomePhabricator

leonardchan (Leonard Chan)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 25 2018, 1:47 PM (125 w, 4 d)

Recent Activity

Mon, Aug 31

leonardchan added a comment to D85924: [clang][feature] Add cxx_abi_relative_vtable feature.

*ping* @aaron.ballman. Would you be able to sign off on this? Otherwise, I'll probably commit this in the next few days.

Mon, Aug 31, 2:03 PM · Restricted Project, Restricted Project

Fri, Aug 28

leonardchan updated the diff for D77248: [llvm][IR] Add a new Constant (UnnamedFunc).
  • Renamed unnamedfunc to unnamed_func.
  • Replaced "equivalent to the resolved function at runtime" with "equivalent to the resolved function as a call target".
  • Added section to LangRef.
Fri, Aug 28, 11:33 AM · Restricted Project
leonardchan added a comment to D85743: [CodeGen][AArch64] Support arm_sve_vector_bits attribute.

The IR differences were caused by the new pass manager which is on by default for the Fuchsia builder. I've re-landed the patch with a fix for CodeGen/attr-arm-sve-vector-bits-call.c to use the legacy pm with -fno-experimental-new-pass-manager.

Fri, Aug 28, 10:49 AM · Restricted Project

Thu, Aug 27

leonardchan updated the diff for D77248: [llvm][IR] Add a new Constant (UnnamedFunc).

Update to reflect comments in the RFC.

Thu, Aug 27, 4:15 PM · Restricted Project
leonardchan added a comment to D85743: [CodeGen][AArch64] Support arm_sve_vector_bits attribute.

Hi! The attr-arm-sve-vector-bits-call.c test seems to be failing on our clang builders:

Thu, Aug 27, 12:57 PM · Restricted Project
leonardchan added a comment to D85404: [lld-macho] Handle TAPI and regular re-exports uniformly.

Hi! I believe our mac builders are failing after this change with

Thu, Aug 27, 10:19 AM · Restricted Project

Wed, Aug 26

leonardchan added inline comments to D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point..
Wed, Aug 26, 12:22 PM · Restricted Project, Restricted Project
leonardchan accepted D86631: [Fixed Point] Add fixed-point to floating point cast types and consteval..
Wed, Aug 26, 12:03 PM · Restricted Project

Aug 21 2020

leonardchan accepted D83294: [Fixed Point] Add codegen for fixed-point shifts..
Aug 21 2020, 10:33 AM · Restricted Project

Aug 20 2020

leonardchan planned changes to D77248: [llvm][IR] Add a new Constant (UnnamedFunc).
Aug 20 2020, 11:35 AM · Restricted Project
leonardchan updated the diff for D77248: [llvm][IR] Add a new Constant (UnnamedFunc).

Clean up some of the code.

Aug 20 2020, 11:35 AM · Restricted Project
leonardchan accepted D86282: [Fixed Point] Use FixedPointBuilder to codegen fixed-point IR..
Aug 20 2020, 10:56 AM · Restricted Project

Aug 18 2020

leonardchan planned changes to D77248: [llvm][IR] Add a new Constant (UnnamedFunc).

Was there an RFC for this?

Missing GlobalISel support

Aug 18 2020, 12:29 PM · Restricted Project
leonardchan updated the diff for D77248: [llvm][IR] Add a new Constant (UnnamedFunc).
Aug 18 2020, 12:25 PM · Restricted Project

Aug 17 2020

leonardchan added a reverting change for rGda0592e4c8df: [libc++] Use CMake interface targets to setup benchmark flags: rG1454018dc1d9: Revert "[libc++] Use CMake interface targets to setup benchmark flags".
Aug 17 2020, 6:12 PM
leonardchan committed rG1454018dc1d9: Revert "[libc++] Use CMake interface targets to setup benchmark flags" (authored by leonardchan).
Revert "[libc++] Use CMake interface targets to setup benchmark flags"
Aug 17 2020, 6:12 PM

Aug 14 2020

leonardchan added a comment to D85924: [clang][feature] Add cxx_abi_relative_vtable feature.

CC @aaron.ballman who committed Features.def for signing off or knowing someone who can sign off.

Aug 14 2020, 2:24 PM · Restricted Project, Restricted Project
leonardchan added a reviewer for D85924: [clang][feature] Add cxx_abi_relative_vtable feature: aaron.ballman.
Aug 14 2020, 2:23 PM · Restricted Project, Restricted Project
leonardchan added a comment to rGda0592e4c8df: [libc++] Use CMake interface targets to setup benchmark flags.

Hi. I believe this patch is incompatible with cmake 3.13.5. We're seeing

Aug 14 2020, 12:37 PM

Aug 13 2020

leonardchan requested review of D85943: Hack for automating fixes for some -Wconversion warning instances.
Aug 13 2020, 3:15 PM · Restricted Project
leonardchan updated the diff for D85924: [clang][feature] Add cxx_abi_relative_vtable feature.
Aug 13 2020, 3:06 PM · Restricted Project, Restricted Project
leonardchan updated the diff for D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use.
Aug 13 2020, 1:54 PM · Restricted Project
leonardchan added a comment to D77606: [libcxxabi] Add macro for changing functions to support the relative vtables ABI.

Long-term, I think we want this to be keyed entirely on a compiler predefine and not chosen in cmake.

Actually, I'd like to use that approach now. @leonardchan is that possible?

Aug 13 2020, 12:31 PM · Restricted Project
leonardchan added a reviewer for D85924: [clang][feature] Add cxx_abi_relative_vtable feature: ldionne.
Aug 13 2020, 12:31 PM · Restricted Project, Restricted Project
leonardchan requested review of D85924: [clang][feature] Add cxx_abi_relative_vtable feature.
Aug 13 2020, 12:31 PM · Restricted Project, Restricted Project
leonardchan updated the diff for D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use.

Store a TargetCXXABI::Kind instead of a string in LangOpts.

Aug 13 2020, 11:46 AM · Restricted Project

Aug 12 2020

leonardchan updated the diff for D77606: [libcxxabi] Add macro for changing functions to support the relative vtables ABI.

Ok. Ready for review!

Aug 12 2020, 5:46 PM · Restricted Project
leonardchan updated the summary of D85576: [clang][Fuchsia] Add relative-vtables multilib.
Aug 12 2020, 5:32 PM · Restricted Project
leonardchan updated the diff for D85576: [clang][Fuchsia] Add relative-vtables multilib.
Aug 12 2020, 5:32 PM · Restricted Project
leonardchan added inline comments to D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use.
Aug 12 2020, 3:28 PM · Restricted Project
leonardchan updated the diff for D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use.
  • Check for lowercase flag values
  • Remove fuchsia-specific changes
Aug 12 2020, 3:28 PM · Restricted Project

Aug 11 2020

leonardchan updated the summary of D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use.
Aug 11 2020, 6:23 PM · Restricted Project
leonardchan requested review of D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use.
Aug 11 2020, 6:23 PM · Restricted Project

Aug 10 2020

leonardchan updated the diff for D85576: [clang][Fuchsia] Add relative-vtables multilib.
Aug 10 2020, 8:58 PM · Restricted Project
leonardchan accepted D85678: [elfabi] Move elfabi related code to InterfaceStub library.

LGTM for LLVM readability.

Aug 10 2020, 3:05 PM · Restricted Project
leonardchan accepted D85312: [ADT] Move FixedPoint.h from Clang to LLVM..

The patch seems straightforward. Other than moving code and trimming llvm:: from types, not sure if there's anything else I should expect. LGTM.

Aug 10 2020, 11:23 AM · Restricted Project, Restricted Project

Aug 7 2020

leonardchan updated the summary of D85576: [clang][Fuchsia] Add relative-vtables multilib.
Aug 7 2020, 5:34 PM · Restricted Project
leonardchan requested review of D85576: [clang][Fuchsia] Add relative-vtables multilib.
Aug 7 2020, 5:34 PM · Restricted Project

Jul 28 2020

leonardchan added a comment to D84202: [clang][noderef] Enable -Wnoderef warning for CXX C-style casts.

users can still disable the warning on line granularity with pragmas.

This makes me a bit uncomfortable because those pragmas extremely ugly (and not easily portable). Also, this will break code for users who were previously doing something that was explicitly allowed (but not explicitly documented, at least). How often do users need to (legitimately, rather than accidentally) use the C-style cast like this?

Jul 28 2020, 12:20 PM · Restricted Project

Jul 27 2020

leonardchan added a comment to D77248: [llvm][IR] Add a new Constant (UnnamedFunc).

*ping*

Jul 27 2020, 10:20 AM · Restricted Project

Jul 22 2020

leonardchan abandoned D83973: [clang][pragma] Extend diagnostic pragmas to allow for only applying to the next line.
Jul 22 2020, 11:48 AM · Restricted Project

Jul 20 2020

leonardchan updated the diff for D83812: [clang][RelativeVTablesABI] Do not emit stubs for architectures that support a PLT relocation.

Add a method to TargetCodeGenInfo the returns if the target supports PC relative PLT relocations,

Jul 20 2020, 9:16 PM · Restricted Project
leonardchan created D84202: [clang][noderef] Enable -Wnoderef warning for CXX C-style casts.
Jul 20 2020, 9:16 PM · Restricted Project

Jul 17 2020

leonardchan added a comment to D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def.

Just in case you haven't seen already, clang/test/OpenMP/barrier_codegen.cpp needs to be updated as well.

Jul 17 2020, 4:53 PM · Restricted Project, Restricted Project, Restricted Project
leonardchan committed rGcf5df40c4cf1: Revert "[AddressSanitizer] Don't use weak linkage for __{start… (authored by leonardchan).
Revert "[AddressSanitizer] Don't use weak linkage for __{start…
Jul 17 2020, 3:33 PM
leonardchan added a reverting change for rGd76e62fdb7a9: [AddressSanitizer] Don't use weak linkage for __{start,stop}_asan_globals: rGcf5df40c4cf1: Revert "[AddressSanitizer] Don't use weak linkage for __{start….
Jul 17 2020, 3:33 PM
leonardchan added a comment to rG3a624c327add: [Matrix] Add the matrix test from D83570. NFC..

Hello. This test seems to be failing for us (https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-x64/b8874608488579495664?) and other builders that use the new pass manager (http://lab.llvm.org:8011/builders/clang-x86_64-debian-new-pass-manager-fast/builds/11949). Would you mind updating the test or reverting for now? Thanks.

Jul 17 2020, 11:39 AM
leonardchan accepted D83999: [CMake][Fuchsia] Include additional tools in the toolchain.
Jul 17 2020, 10:53 AM · Restricted Project

Jul 16 2020

leonardchan created D83973: [clang][pragma] Extend diagnostic pragmas to allow for only applying to the next line.
Jul 16 2020, 11:35 AM · Restricted Project

Jul 14 2020

leonardchan updated the summary of D83812: [clang][RelativeVTablesABI] Do not emit stubs for architectures that support a PLT relocation.
Jul 14 2020, 1:18 PM · Restricted Project
Herald added a reviewer for D83812: [clang][RelativeVTablesABI] Do not emit stubs for architectures that support a PLT relocation: jdoerfert.
Jul 14 2020, 1:17 PM · Restricted Project

Jul 13 2020

leonardchan updated the diff for D77248: [llvm][IR] Add a new Constant (UnnamedFunc).
Jul 13 2020, 4:17 PM · Restricted Project

Jul 9 2020

leonardchan added inline comments to D83294: [Fixed Point] Add codegen for fixed-point shifts..
Jul 9 2020, 12:25 PM · Restricted Project
leonardchan added a comment to D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations..

It wouldn't just be restricted to fixed-point intrinsics, though. It would have to be added to intrinsics like uadd.sat and usub.sat as well, which aren't really tied to fixed-point at all.

Jul 9 2020, 12:11 PM · Restricted Project

Jul 8 2020

leonardchan added a comment to D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations..

Well, it's not so much as adding the bit, but adding the information that the bit exists. That means either new intrinsics for all of the operations, or adding flags to the existing ones. That's a fair bit of added complexity. Also, <signed operation> + <clamp to zero> would do virtually the exact same thing as the new unsigned-with-padding operations, so the utility of adding all of it is a bit questionable.

Jul 8 2020, 4:17 PM · Restricted Project
leonardchan accepted D83212: [Fixed Point] Add fixed-point shift operations and consteval..
Jul 8 2020, 3:23 PM · Restricted Project
leonardchan added inline comments to D83294: [Fixed Point] Add codegen for fixed-point shifts..
Jul 8 2020, 2:10 PM · Restricted Project
leonardchan abandoned D76389: [NewPM] Run the Speculative Execution Pass only if the target has divergent branches.

This seems like it covers a different case than D82735?

Jul 8 2020, 12:31 PM · Restricted Project, Restricted Project

Jun 29 2020

leonardchan committed rGde172dd17f03: [clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast. (authored by leonardchan).
[clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast.
Jun 29 2020, 1:36 PM
leonardchan closed D82802: [clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp.
Jun 29 2020, 1:36 PM · Restricted Project
leonardchan created D82802: [clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp.
Jun 29 2020, 1:01 PM · Restricted Project

Jun 26 2020

leonardchan accepted D82662: [CodeGen] Use the common semantic for fixed-point codegen, not the result semantic..

LGTM. Thanks for the fix.

Jun 26 2020, 10:55 AM · Restricted Project

Jun 25 2020

leonardchan accepted D73186: [AST] Add fixed-point multiplication constant evaluation..

LGTM

Jun 25 2020, 10:46 AM · Restricted Project

Jun 23 2020

leonardchan committed rG723b5a178542: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation (authored by leonardchan).
[lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation
Jun 23 2020, 4:12 PM
leonardchan closed D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 23 2020, 4:12 PM · Restricted Project
leonardchan updated the diff for D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 23 2020, 4:11 PM · Restricted Project
leonardchan added inline comments to D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 23 2020, 12:21 PM · Restricted Project
leonardchan updated the diff for D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 23 2020, 12:21 PM · Restricted Project

Jun 22 2020

leonardchan added a comment to D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.

Looking good so far. Would be good to add a range extension thunk test case. For example:

 .section .text.1, "ax", %progbits
 .global _start
 .type _start, %function
_start: .word callee@PLT - .

 .section .text.2, "ax", %progbits
 .global callee
 .type callee, %function        
callee: ret

Using a linker script to get a > 4gb gap. The AT is there to stop a multi gigabyte file being written.

SECTIONS {
  .text.1 0x10000 : { *(.text.1) }
  .text.2 0x200000000 : AT(0x20000) { *(.text.2) }
}

The .word should be an offset to the range extension thunk instead of the target.

Jun 22 2020, 3:03 PM · Restricted Project
leonardchan updated the diff for D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 22 2020, 3:03 PM · Restricted Project

Jun 11 2020

leonardchan updated the diff for D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.

Rebased and updated tests with assembly instead of yaml.

Jun 11 2020, 1:13 PM · Restricted Project
leonardchan committed rG71568a9e28d6: [clang] Frontend components for the relative vtables ABI (round 2) (authored by leonardchan).
[clang] Frontend components for the relative vtables ABI (round 2)
Jun 11 2020, 11:33 AM

Jun 10 2020

leonardchan committed rG7201272d4c1b: Revert "[clang] Frontend components for the relative vtables ABI" (authored by leonardchan).
Revert "[clang] Frontend components for the relative vtables ABI"
Jun 10 2020, 1:56 PM
leonardchan added a reverting change for rG2e009dbcb3e3: [clang] Frontend components for the relative vtables ABI: rG7201272d4c1b: Revert "[clang] Frontend components for the relative vtables ABI".
Jun 10 2020, 1:56 PM
leonardchan committed rG2e009dbcb3e3: [clang] Frontend components for the relative vtables ABI (authored by leonardchan).
[clang] Frontend components for the relative vtables ABI
Jun 10 2020, 12:50 PM
leonardchan closed D77592: [clang] Frontend components for the relative vtables ABI.
Jun 10 2020, 12:49 PM · Restricted Project
leonardchan committed rG2f6bb2a69215: [clang][Attribute] Fix noderef attribute false-negatives (authored by leonardchan).
[clang][Attribute] Fix noderef attribute false-negatives
Jun 10 2020, 12:49 PM
leonardchan closed D77836: [Attribute] Fix noderef attribute false-negatives.
Jun 10 2020, 12:49 PM · Restricted Project
leonardchan accepted D81514: [Fuchsia] Set projects and runtimes in the cache file.
Jun 10 2020, 12:13 PM · Restricted Project
leonardchan committed rG6adc664b9dfe: [llvm][ELF][AArch64] Handle R_AARCH64_PLT32 relocation (authored by leonardchan).
[llvm][ELF][AArch64] Handle R_AARCH64_PLT32 relocation
Jun 10 2020, 11:46 AM
leonardchan closed D81446: [llvm][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 10 2020, 11:46 AM · Restricted Project

Jun 9 2020

leonardchan updated the diff for D81446: [llvm][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 9 2020, 2:21 PM · Restricted Project
leonardchan added inline comments to D81446: [llvm][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 9 2020, 2:21 PM · Restricted Project
leonardchan added reviewers for D77592: [clang] Frontend components for the relative vtables ABI: phosek, mcgrathr.
Jun 9 2020, 1:14 PM · Restricted Project
leonardchan added a comment to D77836: [Attribute] Fix noderef attribute false-negatives.

Lemme know if there's any more feedback. Will aim for committing this sometime at the end of the day.

Jun 9 2020, 12:40 PM · Restricted Project

Jun 8 2020

leonardchan created D81446: [llvm][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 8 2020, 7:55 PM · Restricted Project
leonardchan added a comment to D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.

D81446 is the LLVM counterpart.

Jun 8 2020, 7:55 PM · Restricted Project
leonardchan added a reviewer for D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation: psmith.
Jun 8 2020, 7:55 PM · Restricted Project
leonardchan updated the diff for D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
  • Removed the llvm changes to be moved to a separate patch.
  • Added a test for checking the relocation used with an undefined weak symbol. IIRC, the behavior of this is unspecified anyway.
  • Added test for checking overflow.
Jun 8 2020, 7:55 PM · Restricted Project
leonardchan accepted D81323: Move *San module passes later in the NPM pipeline.
Jun 8 2020, 11:35 AM · Restricted Project

Jun 4 2020

leonardchan added reviewers for D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation: peter.smith, mcgrathr, phosek, pcc.
Jun 4 2020, 12:09 PM · Restricted Project
leonardchan planned changes to D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 4 2020, 12:09 PM · Restricted Project
leonardchan created D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation.
Jun 4 2020, 12:09 PM · Restricted Project

Jun 1 2020

leonardchan added a comment to D77592: [clang] Frontend components for the relative vtables ABI.

@rjmccall Would it be fine to submit this since you gave LGTM on D72959?

Jun 1 2020, 3:11 PM · Restricted Project
leonardchan updated the diff for D77836: [Attribute] Fix noderef attribute false-negatives.

Rebased

Jun 1 2020, 11:52 AM · Restricted Project

May 29 2020

leonardchan added a comment to D80452: [libc++] Complete overhaul of constexpr support in std::array.

Hi! I think this patch might be the cause of the bug at https://bugs.llvm.org/show_bug.cgi?id=46137.

Essentially, we get an error when attempting to create std::array<S, 0> if S has a non-trivial destructor (full example at the bug link):

test.cc:20:20: error: call to implicitly-deleted default constructor of 'std::array<S, 0>'
  std::array<S, 0> x;  // bad
                   ^
/usr/local/google/home/leonardchan/llvm-monorepo/llvm-build-1-master-fuchsia-toolchain/install/bin/../include/c++/v1/array:252:7: note: default constructor of 'array<S, 0>' is implicitly deleted because field '__w' has a deleted destructor
    } __w;
      ^
/usr/local/google/home/leonardchan/llvm-monorepo/llvm-build-1-master-fuchsia-toolchain/install/bin/../include/c++/v1/array:248:9: note: explicitly defaulted function was implicitly deleted here
        ~__wrapper() = default;
        ^
/usr/local/google/home/leonardchan/llvm-monorepo/llvm-build-1-master-fuchsia-toolchain/install/bin/../include/c++/v1/array:251:13: note: destructor of '__wrapper' is implicitly deleted because variant field '__t' has a non-trivial destructor
        _Tp __t;
            ^
test.cc:20:20: error: attempt to use a deleted function
  std::array<S, 0> x;  // bad
                   ^

I believe std::arrays of size 0 should be legal regardless of constraints on the element type.

May 29 2020, 4:25 PM · Restricted Project
leonardchan added a comment to D80452: [libc++] Complete overhaul of constexpr support in std::array.

Hi! I think this patch might be the cause of the bug at https://bugs.llvm.org/show_bug.cgi?id=46137.

May 29 2020, 4:25 PM · Restricted Project

May 28 2020

leonardchan accepted D80692: Run Coverage pass before other *San passes under new pass manager, round 2.

I foolishly submitted without running check-all, and it turns out this broke a test under check-clang.
Looks like https://reviews.llvm.org/D62888 added tests in sancov-new-pm.c to make sure that sancov + LTO work together, but they won't after this change since the (Thin)LTO pipeline doesn't run things under registerOptimizerLastEPCallback(). So I deleted those tests. Other sanitizers don't work under LTO right now (at least for non-O0) because of the same thing. Does this make sense?

May 28 2020, 4:32 PM · Restricted Project, Restricted Project
leonardchan accepted D80692: Run Coverage pass before other *San passes under new pass manager, round 2.

Would be worthwhile to write a small test that asserts Sancov runs before the other sanitizers under the new PM?

May 28 2020, 1:13 PM · Restricted Project, Restricted Project
leonardchan added a comment to D77836: [Attribute] Fix noderef attribute false-negatives.

*ping*

May 28 2020, 12:38 PM · Restricted Project