Page MenuHomePhabricator

leonardchan (Leonard Chan)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Today

leonardchan added a comment to D94355: [SimplifyCFG] Add relative switch lookup tables.

Almost there! Just a few more comments on my end.

Fri, Jan 22, 10:52 AM · Restricted Project, Restricted Project

Yesterday

leonardchan added a comment to rGd38be2ba0e4e: [llvm-mca] Initial implementation of serialization using JSON. The views.

Hi. It seems this commit is causing this failure on our aarch64 bulder (https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-arm64/b8857452110716658368):

Thu, Jan 21, 4:29 PM
leonardchan requested review of D95182: [clang][Fuchsia] Turn on Relative VTables for Fuchsia.
Thu, Jan 21, 3:54 PM · Restricted Project
leonardchan updated the summary of D95154: [WIP][clang][Fuchsia] Add the *-fuchsia-gnu arch and multilibs.
Thu, Jan 21, 11:21 AM · Restricted Project
leonardchan requested review of D95154: [WIP][clang][Fuchsia] Add the *-fuchsia-gnu arch and multilibs.
Thu, Jan 21, 11:21 AM · Restricted Project

Wed, Jan 20

leonardchan added a comment to D93668: [clang] Override the Fuchsia platform ABI using the triple environment.

Also, this probably isn't very important, but just as a heads up: if we were to depend on the environment component in the triple as the flag for selecting which multilib to use, then the multilib would be stored in a directory containing that environment.

Wed, Jan 20, 11:17 AM · Restricted Project

Tue, Jan 19

leonardchan added a comment to D93668: [clang] Override the Fuchsia platform ABI using the triple environment.

I agree that if we want to allow selecting C++ ABI only, a flag like -fc++abi= with some additional checks to disallow invalid combinations is better. The question is whether we want to allow that in the first place? The motivation behind this change is to support generating code that's ABI compatible with the code generated by GCC. That could be expressed using the target triple (one idea is to use *-*-fuchsia-gnu), which would cover both C++ ABI as well as other aspects of the ABI (for example it could also disable SafeStack/ShadowCallStack) so developers don't need to concern themselves with all the details of the ABI, which could evolve over time expanding the set of flags you'd need to pass to the compiler to generate code that's ABI compatible with GCC.

Tue, Jan 19, 11:40 AM · Restricted Project

Fri, Jan 15

leonardchan added a comment to D91466: [WIP][clang][Fuchsia] Support HWASan for Fuchsia.
In D91466#2395297, @pcc wrote:

How does Zircon handle tagged addresses in syscalls? Are they handled equivalently to Linux's tagged address ABI?

Fri, Jan 15, 5:13 PM · Restricted Project, Restricted Project, Restricted Project
leonardchan updated the diff for D91466: [WIP][clang][Fuchsia] Support HWASan for Fuchsia.

Locally I'm able to build and run the bringup.arm64 config (that is launch the shell and run some commands).

Fri, Jan 15, 5:09 PM · Restricted Project, Restricted Project, Restricted Project

Thu, Jan 14

leonardchan added a comment to D94355: [SimplifyCFG] Add relative switch lookup tables.

Looking good. Just a few more comments on my end.

Thu, Jan 14, 11:07 AM · Restricted Project, Restricted Project

Tue, Jan 12

leonardchan added inline comments to D94355: [SimplifyCFG] Add relative switch lookup tables.
Tue, Jan 12, 10:09 AM · Restricted Project, Restricted Project

Mon, Jan 11

leonardchan updated the diff for D93668: [clang] Override the Fuchsia platform ABI using the triple environment.
Mon, Jan 11, 3:31 PM · Restricted Project
leonardchan added inline comments to D94355: [SimplifyCFG] Add relative switch lookup tables.
Mon, Jan 11, 11:29 AM · Restricted Project, Restricted Project

Thu, Jan 7

leonardchan added a comment to D93668: [clang] Override the Fuchsia platform ABI using the triple environment.

I'd prefer to use the target triple rather than introducing a custom flag.

With dedicated flags, you might eventually end up in a similar situation as D85802, that is in the extreme case you might end up with -f[no-]fuchsia-c++-abi, -f[no-]webassembly-c++-abi, etc. which is not any better than -fc++-abi=.

With target triple, I can imagine using either <arch>-unknown-fuchsia-itanium or <arch>-unknown-fuchsia-gnu, where the former would mean targeting Fuchsia with Itanium C++ ABI while the latter would mean using GCC compatible ABI (which would imply Itanium C++ ABI). Both of these are already used by MinGW for the same purpose so there's a precedent and we don't need to invent anything new.

Thu, Jan 7, 1:11 PM · Restricted Project

Dec 21 2020

leonardchan requested review of D93668: [clang] Override the Fuchsia platform ABI using the triple environment.
Dec 21 2020, 3:36 PM · Restricted Project

Dec 7 2020

leonardchan closed D92141: Fix noderef for AddrOf on MemberExpr.

Ok this time I remembered the email. Unsure why the bug isn't automatically closed though.

Dec 7 2020, 2:51 PM · Restricted Project
leonardchan committed rG6dad7ec539cb: [clang] Fix noderef for AddrOf on MemberExpr (authored by thejh).
[clang] Fix noderef for AddrOf on MemberExpr
Dec 7 2020, 2:50 PM
leonardchan closed D92140: Fix noderef for array member of deref expr.

Committed in 155fca3cae275562e626d3e4fbfac70b4b75d2e7. (Sorry, I forgot to change the author email in the commit)

Dec 7 2020, 2:42 PM · Restricted Project
leonardchan committed rG155fca3cae27: [clang] Fix noderef for array member of deref expr (authored by leonardchan).
[clang] Fix noderef for array member of deref expr
Dec 7 2020, 2:40 PM
leonardchan added a comment to D92140: Fix noderef for array member of deref expr.

Sorry. I accidentally missed this in my emails. Will commit these.

Dec 7 2020, 2:14 PM · Restricted Project

Dec 1 2020

leonardchan accepted D92442: [lsan] Use final on Fuchsia ThreadContext declaration.
Dec 1 2020, 6:40 PM · Restricted Project
leonardchan committed rG1e91803c671a: Recommit "[clang][Fuchsia] Add relative-vtables multilib" (authored by leonardchan).
Recommit "[clang][Fuchsia] Add relative-vtables multilib"
Dec 1 2020, 5:03 PM
leonardchan committed rG19bdc8e5a307: [llvm] Fix for failing test from fdbd84c6c819d4462546961f6086c1524d5d5ae8 (authored by leonardchan).
[llvm] Fix for failing test from fdbd84c6c819d4462546961f6086c1524d5d5ae8
Dec 1 2020, 3:48 PM

Nov 30 2020

leonardchan added a reverting change for rGfdbd84c6c819: [clang][Fuchsia] Add relative-vtables multilib: rG7bc944c102c2: Revert "[clang][Fuchsia] Add relative-vtables multilib".
Nov 30 2020, 7:23 PM
leonardchan committed rG7bc944c102c2: Revert "[clang][Fuchsia] Add relative-vtables multilib" (authored by leonardchan).
Revert "[clang][Fuchsia] Add relative-vtables multilib"
Nov 30 2020, 7:22 PM
leonardchan added a reverting change for D85576: [clang][Fuchsia] Add relative-vtables multilib: rG7bc944c102c2: Revert "[clang][Fuchsia] Add relative-vtables multilib".
Nov 30 2020, 7:22 PM · Restricted Project
leonardchan committed rGfdbd84c6c819: [clang][Fuchsia] Add relative-vtables multilib (authored by leonardchan).
[clang][Fuchsia] Add relative-vtables multilib
Nov 30 2020, 6:22 PM
leonardchan closed D85576: [clang][Fuchsia] Add relative-vtables multilib.
Nov 30 2020, 6:22 PM · Restricted Project
leonardchan added a reverting change for rG7c2bc3b71dc0: [clang][Fuchsia] Add relative-vtables multilib: rGa160189c5dfa: Revert "[clang][Fuchsia] Add relative-vtables multilib".
Nov 30 2020, 6:21 PM
leonardchan committed rGa160189c5dfa: Revert "[clang][Fuchsia] Add relative-vtables multilib" (authored by leonardchan).
Revert "[clang][Fuchsia] Add relative-vtables multilib"
Nov 30 2020, 6:21 PM
leonardchan committed rG7c2bc3b71dc0: [clang][Fuchsia] Add relative-vtables multilib (authored by leonardchan).
[clang][Fuchsia] Add relative-vtables multilib
Nov 30 2020, 6:19 PM
leonardchan committed rG4d7f3d68f173: [llvm] Fix for failing test from cf8ff75bade763b054476321dcb82dcb2e7744c7 (authored by leonardchan).
[llvm] Fix for failing test from cf8ff75bade763b054476321dcb82dcb2e7744c7
Nov 30 2020, 5:22 PM
leonardchan committed rGcf8ff75bade7: [clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs (authored by leonardchan).
[clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs
Nov 30 2020, 4:04 PM
leonardchan closed D83812: [clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs.
Nov 30 2020, 4:04 PM · Restricted Project
leonardchan accepted D92291: clang/test: Remove platform-linker feature.
Nov 30 2020, 1:08 PM · Restricted Project, Restricted Project
leonardchan committed rG61aec69a65de: [libcxxabi] Add macro for changing functions to support the relative vtables ABI (authored by leonardchan).
[libcxxabi] Add macro for changing functions to support the relative vtables ABI
Nov 30 2020, 10:51 AM
leonardchan closed D77606: [libcxxabi] Add macro for changing functions to support the relative vtables ABI.
Nov 30 2020, 10:50 AM · Restricted Project
leonardchan updated subscribers of D92291: clang/test: Remove platform-linker feature.

@phosek This shouldn't affect supporting riscv with our toolchain, right?

Nov 30 2020, 10:23 AM · Restricted Project, Restricted Project

Nov 25 2020

leonardchan accepted D92141: Fix noderef for AddrOf on MemberExpr.

LGTM. Thanks

Nov 25 2020, 4:37 PM · Restricted Project
leonardchan accepted D92140: Fix noderef for array member of deref expr.

Thanks for catching this. LGTM

Nov 25 2020, 4:30 PM · Restricted Project
leonardchan updated the diff for D77606: [libcxxabi] Add macro for changing functions to support the relative vtables ABI.

Removed formatting for existing code.

Nov 25 2020, 1:40 PM · Restricted Project

Nov 24 2020

leonardchan added inline comments to D77606: [libcxxabi] Add macro for changing functions to support the relative vtables ABI.
Nov 24 2020, 3:20 PM · Restricted Project
leonardchan updated the diff for D77606: [libcxxabi] Add macro for changing functions to support the relative vtables ABI.
Nov 24 2020, 3:19 PM · Restricted Project

Nov 23 2020

leonardchan added a comment to D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros.
In D91747#2412212, @rnk wrote:
Nov 23 2020, 12:28 PM · Restricted Project
leonardchan added a comment to D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros.

Hi, it seems that p2.cpp is failing on our production builder (https://luci-milo.appspot.com/p/fuchsia/builders/prod/clang-linux-x64/b8862835022166171808):

Nov 23 2020, 12:01 PM · Restricted Project

Nov 19 2020

leonardchan accepted D91828: [Sema/Attribute] Ignore noderef attribute in unevaluated context.

LGTM but you should probably also wait for @aaron.ballman or @rsmith to also chime in.

Nov 19 2020, 5:12 PM · Restricted Project
leonardchan added a comment to D85576: [clang][Fuchsia] Add relative-vtables multilib.

*ping* any more comments on this patch?

Nov 19 2020, 10:56 AM · Restricted Project
leonardchan added a comment to D77606: [libcxxabi] Add macro for changing functions to support the relative vtables ABI.

*ping* Any more comments on this patch?

Nov 19 2020, 10:55 AM · Restricted Project
leonardchan updated the diff for D83812: [clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs.

@rjmccall This might've changed a bit since you last accepted the revision. Will wait a couple of days before submitting if you have any more comments on this.

Nov 19 2020, 10:39 AM · Restricted Project
leonardchan committed rGa97f62837f59: [llvm][IR] Add dso_local_equivalent Constant (authored by leonardchan).
[llvm][IR] Add dso_local_equivalent Constant
Nov 19 2020, 10:27 AM
leonardchan closed D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 19 2020, 10:27 AM · Restricted Project

Nov 17 2020

leonardchan added a comment to D90982: Ignore implicit nodes in IgnoreUnlessSpelledInSource mode.

Hi. I suspect it might be this patch or D90984 that might be leading to the test failure we're seeing on our arm64 builders

Nov 17 2020, 12:41 PM · Restricted Project
leonardchan added a comment to D77248: [llvm][IR] Add dso_local_equivalent Constant.

Welp, it turns out that if I went with the approach of adding the constant manually everywhere the macro was used, I'd be adding a lot of special cases everywhere. The only case I needed to cover was in Core which depends on Value.def:

/usr/local/google/home/leonardchan/llvm-monorepo/llvm-project-1/llvm/lib/IR/Core.cpp:832:12: note: expanded from macro 'HANDLE_VALUE'
    return LLVM##Name##ValueKind;
           ^
<scratch space>:239:1: note: expanded from here
LLVMDSOLocalEquivalentValueKind

The only way I could think of preventing the constant from being used here while still being used in other places HANDLE_VALUE/CONSTANT are used is a "banlist" approach via more macros in Value.def. Open to other ideas if it doesn't look that good.

Nov 17 2020, 12:05 PM · Restricted Project
leonardchan updated the diff for D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 17 2020, 12:01 PM · Restricted Project
leonardchan added inline comments to D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 17 2020, 10:56 AM · Restricted Project
leonardchan updated the diff for D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 17 2020, 10:56 AM · Restricted Project

Nov 16 2020

leonardchan updated the diff for D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 16 2020, 11:06 AM · Restricted Project
leonardchan abandoned D91468: [llvm] Add OpenACC as a dependency to llvm-config.

Is this obsolete after D91470 has been committed?

Nov 16 2020, 10:34 AM · Restricted Project
leonardchan added inline comments to D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 16 2020, 10:21 AM · Restricted Project

Nov 13 2020

leonardchan requested review of D91468: [llvm] Add OpenACC as a dependency to llvm-config.
Nov 13 2020, 4:23 PM · Restricted Project
leonardchan planned changes to D91466: [WIP][clang][Fuchsia] Support HWASan for Fuchsia.
Nov 13 2020, 3:10 PM · Restricted Project, Restricted Project, Restricted Project
leonardchan requested review of D91466: [WIP][clang][Fuchsia] Support HWASan for Fuchsia.
Nov 13 2020, 3:10 PM · Restricted Project, Restricted Project, Restricted Project
leonardchan accepted D91389: [MemProf][NewPM] Make memprof passes required.

LGTM

Nov 13 2020, 3:06 PM · Restricted Project, Restricted Project
leonardchan added a comment to D90848: llvmbuildectomy - part 2.

Are there any OpenACC specific tests?

Nov 13 2020, 2:40 PM · Restricted Project
leonardchan added inline comments to D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 13 2020, 2:21 PM · Restricted Project
leonardchan updated the diff for D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 13 2020, 2:21 PM · Restricted Project
leonardchan added a comment to D90848: llvmbuildectomy - part 2.

There was an inconsistency in the LLVMBuild.txt for LLVM Frontend: OpenACC wasn't listed but it was part of the CMake infrastructure. A side effect of the llvmbuildectomy has been to remove that inconsistency and register OpenACC as a regular component.

Looking at the error log, there is a missing libLLVMFrontendOpenACC.a
But I cannot see any reference to FrontendOpenACC in the build log, just as if it wasn't build, which is odd.
I failed to reproduce your issue, but does that OpenACC stuff rings any bell? Can you force building that component and see what happens?

Nov 13 2020, 2:15 PM · Restricted Project
leonardchan added a comment to D90848: llvmbuildectomy - part 2.

Hi, it looks like this might be leading to some test failures on our toolchain builders:

Nov 13 2020, 10:59 AM · Restricted Project
leonardchan accepted D91385: [DFSan][NewPM] Handle dfsan under NPM.

LGTM

Nov 13 2020, 10:49 AM · Restricted Project, Restricted Project

Nov 12 2020

leonardchan accepted D91387: [Driver] Support UBSan multilib.

LGTM

Nov 12 2020, 1:40 PM · Restricted Project
leonardchan updated the summary of D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 12 2020, 12:00 PM · Restricted Project
leonardchan updated the summary of D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 12 2020, 11:50 AM · Restricted Project
leonardchan added a comment to D77248: [llvm][IR] Add dso_local_equivalent Constant.

Apologies for my late reply. A couple of comments inlined

See RFC for more details.

Neither the RFC nor the patch mentions the immediate use case. It is possible that the merit is buries in a deep message but for a few feature the description itself should justify its value (dblaikie mentioned that:

We should do this because I need it" (we shouldn't be implementing features for especially niche use cases/if they don't generalize) isn't always a compelling motivation but "we should do this because someone might need it" isn't either (we shouldn't be implementing features that have no users).

Please add the use cases.

Nov 12 2020, 11:50 AM · Restricted Project
leonardchan updated the diff for D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 12 2020, 11:50 AM · Restricted Project

Nov 11 2020

leonardchan updated the diff for D77248: [llvm][IR] Add dso_local_equivalent Constant.

Updated some renamed variables that I didn't check prior.

Nov 11 2020, 3:21 PM · Restricted Project
leonardchan updated the diff for D77248: [llvm][IR] Add dso_local_equivalent Constant.

Rebased

Nov 11 2020, 3:12 PM · Restricted Project
leonardchan added a comment to D90959: [zorg][Fuchsia] Run check-lld with 32 jobs.

Specifying 32 jobs as a hard coded value in the build factory does not look right. You may want to parametrize this somehow.

Nov 11 2020, 10:45 AM · Restricted Project
leonardchan updated the diff for D90959: [zorg][Fuchsia] Run check-lld with 32 jobs.
Nov 11 2020, 10:44 AM · Restricted Project

Nov 6 2020

leonardchan added inline comments to D90959: [zorg][Fuchsia] Run check-lld with 32 jobs.
Nov 6 2020, 12:51 PM · Restricted Project
leonardchan updated the diff for D90959: [zorg][Fuchsia] Run check-lld with 32 jobs.
Nov 6 2020, 12:51 PM · Restricted Project
leonardchan updated the diff for D90959: [zorg][Fuchsia] Run check-lld with 32 jobs.

Updated to use LIT_OPTS.

Nov 6 2020, 11:18 AM · Restricted Project
leonardchan requested review of D90959: [zorg][Fuchsia] Run check-lld with 32 jobs.
Nov 6 2020, 10:13 AM · Restricted Project

Nov 5 2020

leonardchan committed rG71b0ee72bbe5: [NFC] Add InitializePlatformCommonFlags for Fuchsia (authored by leonardchan).
[NFC] Add InitializePlatformCommonFlags for Fuchsia
Nov 5 2020, 10:40 AM
leonardchan closed D90864: [NFC] Add InitializePlatformCommonFlags for Fuchsia.
Nov 5 2020, 10:40 AM · Restricted Project
leonardchan added a comment to D90864: [NFC] Add InitializePlatformCommonFlags for Fuchsia.

Sorry, feel free to land fixes like this without review.

Nov 5 2020, 10:36 AM · Restricted Project
leonardchan requested review of D90864: [NFC] Add InitializePlatformCommonFlags for Fuchsia.
Nov 5 2020, 10:27 AM · Restricted Project
leonardchan abandoned D90694: [lsan] Create a dummy SuspendedThreadsList for Fuchsia.

Abandoned since https://reviews.llvm.org/D90695 fixes this

Nov 5 2020, 10:24 AM · Restricted Project
leonardchan added a comment to D77248: [llvm][IR] Add dso_local_equivalent Constant.

@MaskRay any more comments?

Nov 5 2020, 9:40 AM · Restricted Project

Nov 3 2020

leonardchan added a comment to D90695: [compiler-rt] Use empty SuspendedThreadsList for Fuchsia.

Sorry for that.
Does fuchsia has any build bots? Would be nice to get automatic email about such breaks.

Nov 3 2020, 12:54 PM · Restricted Project
leonardchan added a comment to D90694: [lsan] Create a dummy SuspendedThreadsList for Fuchsia.

Unsure if this is the best way to go about it, so open to other solutions.

Nov 3 2020, 10:30 AM · Restricted Project
leonardchan requested review of D90694: [lsan] Create a dummy SuspendedThreadsList for Fuchsia.
Nov 3 2020, 10:30 AM · Restricted Project

Nov 2 2020

leonardchan updated the diff for D83812: [clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs.
Nov 2 2020, 4:11 PM · Restricted Project
leonardchan added a comment to D77248: [llvm][IR] Add dso_local_equivalent Constant.

llc -filetype=obj doesn't. Please fix it. It is a bit unfortunate but the ELFObjectWriter generally has more restrictions than the assembler writer.

Nov 2 2020, 3:57 PM · Restricted Project
leonardchan updated the diff for D77248: [llvm][IR] Add dso_local_equivalent Constant.
Nov 2 2020, 3:56 PM · Restricted Project

Oct 27 2020

leonardchan added a comment to D90275: [clang][IR] Add support for leaf attribute.

I'd recommend splitting this into two patches, one for LLVM changes and another for Clang changes.

Oct 27 2020, 5:53 PM · Restricted Project, Restricted Project
leonardchan added a comment to D77248: [llvm][IR] Add dso_local_equivalent Constant.

*ping* for other comments. I'll probably commit this at the end of the week unless others have more to add.

Oct 27 2020, 5:20 PM · Restricted Project

Oct 23 2020

leonardchan updated the diff for D83812: [clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs.

Update to use dso_local_equivalent instead of emitting stubs in the frontend. dso_local_equivalent should emit a stub automatically if one is required for the target (ie. it does not support PLTs).

Oct 23 2020, 2:19 PM · Restricted Project
leonardchan updated the diff for D77248: [llvm][IR] Add dso_local_equivalent Constant.
Oct 23 2020, 12:22 PM · Restricted Project

Oct 19 2020

leonardchan updated the diff for D85576: [clang][Fuchsia] Add relative-vtables multilib.

Updated to use the -fexperimental-relative-c++-ab-vtables flag now that D85802 was reverted. This will be used for the purpose of testing the relative vtables ABI in Fuchsia CQ builders to ensure all tests are run, accounting for flakes. The end goal will involve not having a relative vtables multilib, but instead making it the default for the fuchsia ABI, and instead having a separate Itanium multilib for supporting GCC.

Oct 19 2020, 1:41 PM · Restricted Project

Oct 15 2020

leonardchan added a reverting change for rG683b308c07bf: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use: rG79829a470405: Revert "[clang] Add -fc++-abi= flag for specifying which C++ ABI to use".
Oct 15 2020, 2:25 PM