Page MenuHomePhabricator

YangKeao (YangKeao)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 17 2021, 12:29 AM (61 w, 5 d)

Recent Activity

Wed, May 18

YangKeao updated the diff for D125870: [Polly] Migrate -polly-mse to the new pass manager..

Format codes

Wed, May 18, 6:56 AM · Restricted Project, Restricted Project, Restricted Project
YangKeao updated the diff for D125870: [Polly] Migrate -polly-mse to the new pass manager..
Wed, May 18, 5:10 AM · Restricted Project, Restricted Project, Restricted Project
YangKeao updated the diff for D125870: [Polly] Migrate -polly-mse to the new pass manager..

rebase to the master

Wed, May 18, 5:07 AM · Restricted Project, Restricted Project, Restricted Project
YangKeao updated the diff for D125870: [Polly] Migrate -polly-mse to the new pass manager..
Wed, May 18, 3:26 AM · Restricted Project, Restricted Project, Restricted Project
YangKeao requested review of D125870: [Polly] Migrate -polly-mse to the new pass manager..
Wed, May 18, 3:23 AM · Restricted Project, Restricted Project, Restricted Project
YangKeao accepted D125830: [Analysis] Avoid virtual dtor. NFC..

Thanks.

Wed, May 18, 3:17 AM · Restricted Project, Restricted Project

Tue, May 10

YangKeao added a comment to D124904: [DomPrinter] migrate -dot-dom to the new pass manager.

LGTM.

Do I have permission to commit for you?

Tue, May 10, 8:51 PM · Restricted Project, Restricted Project

Sat, May 7

YangKeao added inline comments to D124904: [DomPrinter] migrate -dot-dom to the new pass manager.
Sat, May 7, 1:34 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D124904: [DomPrinter] migrate -dot-dom to the new pass manager.
Sat, May 7, 1:34 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D124904: [DomPrinter] migrate -dot-dom to the new pass manager.

Use pointer in the specialization of DOTGraphTraits

Sat, May 7, 1:32 AM · Restricted Project, Restricted Project

Fri, May 6

YangKeao added a comment to D123678: [polly] migrate -polly-show to the new pass manager.

LGTM. Thanks for your work! Do I have permission to commit for you?

Fri, May 6, 10:01 PM · Restricted Project, Restricted Project
YangKeao added inline comments to D123678: [polly] migrate -polly-show to the new pass manager.
Fri, May 6, 10:37 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D123678: [polly] migrate -polly-show to the new pass manager.

Use GraphTraits<ScopDetection *>, remove redundant comments

Fri, May 6, 10:33 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.

Use pointer specialization by default, e.g. GraphTraits<ScopDetection *> but not GraphTraits<ScopDetection>

Fri, May 6, 10:30 AM · Restricted Project, Restricted Project

Wed, May 4

YangKeao updated the diff for D124904: [DomPrinter] migrate -dot-dom to the new pass manager.

rebase with the latest main branch

Wed, May 4, 8:20 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D124904: [DomPrinter] migrate -dot-dom to the new pass manager.
Wed, May 4, 7:55 AM · Restricted Project, Restricted Project
YangKeao added a comment to D123678: [polly] migrate -polly-show to the new pass manager.

Nice catch. Fixed in the latest commit.

Wed, May 4, 12:21 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D123678: [polly] migrate -polly-show to the new pass manager.

move the default parameters to the declaration

Wed, May 4, 12:18 AM · Restricted Project, Restricted Project
YangKeao added a comment to D123678: [polly] migrate -polly-show to the new pass manager.

When compiling under Windows with cmake -DPOLLY_ENABLE_GPGPU_CODEGEN=ON, I get a linker error:

Polly.lib(PPCGCodeGeneration.obj) : error LNK2019: unresolved external symbol "class llvm::Pass * __cdecl polly::createDOTOnlyPrinterPass(void)" (?createDOTOnlyPrinterPass@polly@@YAPEAVPass@llvm@@XZ) referenced in function "public: __cdecl `anonymous namespace'::PollyForcePassLinki
ng::PollyForcePassLinking(void)" (??0PollyForcePassLinking@?A0x3c23cca7@@QEAA@XZ) [C:\Users\meinersbur\build\llvm-project\debug_vs17\tools\opt\opt.vcxproj]
Polly.lib(PPCGCodeGeneration.obj) : error LNK2019: unresolved external symbol "class llvm::Pass * __cdecl polly::createDOTOnlyViewerPass(void)" (?createDOTOnlyViewerPass@polly@@YAPEAVPass@llvm@@XZ) referenced in function "public: __cdecl `anonymous namespace'::PollyForcePassLinking
::PollyForcePassLinking(void)" (??0PollyForcePassLinking@?A0x3c23cca7@@QEAA@XZ) [C:\Users\meinersbur\build\llvm-project\debug_vs17\tools\opt\opt.vcxproj]
Polly.lib(PPCGCodeGeneration.obj) : error LNK2019: unresolved external symbol "class llvm::Pass * __cdecl polly::createDOTPrinterPass(void)" (?createDOTPrinterPass@polly@@YAPEAVPass@llvm@@XZ) referenced in function "public: __cdecl `anonymous namespace'::PollyForcePassLinking::Poll
yForcePassLinking(void)" (??0PollyForcePassLinking@?A0x3c23cca7@@QEAA@XZ) [C:\Users\meinersbur\build\llvm-project\debug_vs17\tools\opt\opt.vcxproj]
Polly.lib(PPCGCodeGeneration.obj) : error LNK2019: unresolved external symbol "class llvm::Pass * __cdecl polly::createDOTViewerPass(void)" (?createDOTViewerPass@polly@@YAPEAVPass@llvm@@XZ) referenced in function "public: __cdecl `anonymous namespace'::PollyForcePassLinking::PollyF
orcePassLinking(void)" (??0PollyForcePassLinking@?A0x3c23cca7@@QEAA@XZ) [C:\Users\meinersbur\build\llvm-project\debug_vs17\tools\opt\opt.vcxproj]
C:\Users\meinersbur\build\llvm-project\debug_vs17\Debug\bin\opt.exe : fatal error LNK1120: 4 unresolved externals [C:\Users\meinersbur\build\llvm-project\debug_vs17\tools\opt\opt.vcxproj]

I could not yet find a config that also fails under Linux, but it looks like some library dependencies are wrong.

Wed, May 4, 12:17 AM · Restricted Project, Restricted Project
YangKeao requested review of D124904: [DomPrinter] migrate -dot-dom to the new pass manager.
Wed, May 4, 12:06 AM · Restricted Project, Restricted Project

Tue, May 3

YangKeao updated the diff for D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.

format codes

Tue, May 3, 9:12 PM · Restricted Project, Restricted Project
YangKeao updated the diff for D123678: [polly] migrate -polly-show to the new pass manager.

format codes

Tue, May 3, 9:12 PM · Restricted Project, Restricted Project
YangKeao updated the diff for D123678: [polly] migrate -polly-show to the new pass manager.

fix and add test for the specialization

Tue, May 3, 5:35 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.
Tue, May 3, 5:35 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.

Fix wrong Twine usage

Tue, May 3, 5:30 AM · Restricted Project, Restricted Project
YangKeao added inline comments to D123678: [polly] migrate -polly-show to the new pass manager.
Tue, May 3, 1:01 AM · Restricted Project, Restricted Project

Apr 21 2022

YangKeao added a comment to D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.

@Meinersbur Could you help me to commit this? 🍻

Apr 21 2022, 5:03 AM · Restricted Project, Restricted Project

Apr 20 2022

YangKeao added inline comments to D123678: [polly] migrate -polly-show to the new pass manager.
Apr 20 2022, 9:09 AM · Restricted Project, Restricted Project

Apr 19 2022

YangKeao updated the diff for D123678: [polly] migrate -polly-show to the new pass manager.

Remove duplicated implementation

Apr 19 2022, 10:48 PM · Restricted Project, Restricted Project
YangKeao updated the diff for D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.

Modify name from run*Impl to *GraphForFunction

Apr 19 2022, 10:46 PM · Restricted Project, Restricted Project
YangKeao updated the diff for D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.
Apr 19 2022, 7:40 PM · Restricted Project, Restricted Project
YangKeao added a comment to D123678: [polly] migrate -polly-show to the new pass manager.

Fixed in the newest diff.

Apr 19 2022, 6:59 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D123678: [polly] migrate -polly-show to the new pass manager.

Restore the pass of legacy pass manager.

Apr 19 2022, 6:58 AM · Restricted Project, Restricted Project
YangKeao updated the summary of D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.
Apr 19 2022, 6:15 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.

Add runViewerImpl and runPrinterImpl to store the common implementation of the new and legacy pass.

Apr 19 2022, 6:15 AM · Restricted Project, Restricted Project
YangKeao added a comment to D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.

DOTGraphTraitsPrinter is not used in this patch.

Apr 19 2022, 5:50 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.
  1. Modify the name from Legacy* to *LegacyPass
  2. Upload the diff with git diff -U999999
Apr 19 2022, 5:48 AM · Restricted Project, Restricted Project

Apr 14 2022

YangKeao updated the diff for D123678: [polly] migrate -polly-show to the new pass manager.
Apr 14 2022, 2:45 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.

Fix according to comments

Apr 14 2022, 2:34 AM · Restricted Project, Restricted Project

Apr 13 2022

YangKeao requested review of D123678: [polly] migrate -polly-show to the new pass manager.
Apr 13 2022, 6:23 AM · Restricted Project, Restricted Project
YangKeao requested review of D123677: [PassManager] Implement DOTGraphTraitsViewer under NPM.
Apr 13 2022, 6:21 AM · Restricted Project, Restricted Project
YangKeao abandoned D99585: [X86] add dwarf information for loop stack probe.

As https://reviews.llvm.org/rGa8ac117d98f6548635b18b58159c9cfb31ba4762 is committed, I will close this revision.

Apr 13 2022, 5:51 AM · Restricted Project, Restricted Project

Apr 26 2021

YangKeao added a comment to D99585: [X86] add dwarf information for loop stack probe.

Does anyone know why the unit test failed?

Apr 26 2021, 7:49 AM · Restricted Project, Restricted Project
YangKeao added a comment to D99585: [X86] add dwarf information for loop stack probe.

Oops. Sorry, it doesn't matter. The stack probing part will never be a parent frame of anything, so it would still be nice as it's the first frame to unwind. This patch is still good 🍻 .

Apr 26 2021, 7:06 AM · Restricted Project, Restricted Project
YangKeao added a comment to D99585: [X86] add dwarf information for loop stack probe.

Please correct me if I'm wrong. I realize that generating a DWARF message based on r11d doesn't help the unwinder to get a correct backtrace.

Apr 26 2021, 7:04 AM · Restricted Project, Restricted Project

Apr 21 2021

YangKeao added a comment to D99585: [X86] add dwarf information for loop stack probe.

Better to rebase it since many changes had committed with D99579.

Apr 21 2021, 11:02 AM · Restricted Project, Restricted Project
YangKeao updated the diff for D99585: [X86] add dwarf information for loop stack probe.

rebase origin/main

Apr 21 2021, 10:57 AM · Restricted Project, Restricted Project

Apr 15 2021

YangKeao abandoned D98789: [PEI] add dwarf information for stack probe.

Stack probing with loop should be discussed further in D99585.

Apr 15 2021, 11:02 AM · Restricted Project

Mar 31 2021

YangKeao added a comment to D99579: [X86] add dwarf annotation for inline stack probe.

Landed this, thank you!

Mar 31 2021, 8:52 PM · Restricted Project

Mar 30 2021

YangKeao added a comment to D99579: [X86] add dwarf annotation for inline stack probe.

Do you have ability to commit this yourself, or would you need somebody to do it for you?

Mar 30 2021, 5:35 PM · Restricted Project
YangKeao updated subscribers of D99585: [X86] add dwarf information for loop stack probe.

@nagisa This is another part of D98789, and is only implemented for 64-bit platform.

Mar 30 2021, 6:03 AM · Restricted Project, Restricted Project
YangKeao requested review of D99585: [X86] add dwarf information for loop stack probe.
Mar 30 2021, 6:02 AM · Restricted Project, Restricted Project
YangKeao added a comment to D99579: [X86] add dwarf annotation for inline stack probe.

I installed clang-format later, and nothing found (there is no lint message). How could I update this patch and remove the "clang-format not found in user's PATH; not linting file." warning? (or just left it here 😋 )

Mar 30 2021, 5:13 AM · Restricted Project
YangKeao updated subscribers of D99579: [X86] add dwarf annotation for inline stack probe.

@nagisa This is the inline part of D98789 😋 .

Mar 30 2021, 5:08 AM · Restricted Project
YangKeao requested review of D99579: [X86] add dwarf annotation for inline stack probe.
Mar 30 2021, 5:02 AM · Restricted Project

Mar 29 2021

YangKeao added a comment to D98789: [PEI] add dwarf information for stack probe.

@YangKeao Will you be pursuing this further? Should I take over this for you?

Mar 29 2021, 10:09 PM · Restricted Project

Mar 19 2021

YangKeao added a comment to D98789: [PEI] add dwarf information for stack probe.

btw I prototyped a D98906: [X86] Improve lowering of the unrolled inline-asm probing yesterday as an alternative approach towards improving the unrolled case.

Mar 19 2021, 4:46 AM · Restricted Project
YangKeao updated the diff for D98789: [PEI] add dwarf information for stack probe.

left comments about 32bit

Mar 19 2021, 12:13 AM · Restricted Project

Mar 18 2021

YangKeao updated the diff for D98789: [PEI] add dwarf information for stack probe.

Remove dwarf information for 32bit and use R11 as the iterate bound / dwarf register

Mar 18 2021, 11:59 PM · Restricted Project
YangKeao added a comment to D98789: [PEI] add dwarf information for stack probe.

Normally, I'd expect some register is naturally free in the prologue, but you could get into weird situations. On 32-bit specifically, consider compiling with -mregparm=3; I think there are no registers which are unconditionally safe in that case. One possibility is to always use EAX, and just save/restore it if necessary. See isEAXAlive in X86FrameLowering::emitPrologue.

Alternatively, you could ensure that some callee-save GPR is spilled, and explicitly use that register. This is taking advantage of the fact this is part of the prologue: there can't be any other uses of callee-save registers at that point. (In theory, it might be possibly for an exotic calling convention to have no callee-save registers, but I don't think there are any in practice.)

Mar 18 2021, 10:49 PM · Restricted Project
YangKeao added inline comments to D98789: [PEI] add dwarf information for stack probe.
Mar 18 2021, 10:39 PM · Restricted Project
YangKeao added a comment to D98789: [PEI] add dwarf information for stack probe.

A care must be taken to not overwrite the arguments as well. For instance on SysV x86_64 ABI rdi, rsi, rdx, rcx, r8, r9 are used to pass in integer arguments. For functions with a small number of arguments one of these could be reused, but if a function happens to use all of them, unconditional use of rdx would clobber the argument.

Mar 18 2021, 10:39 AM · Restricted Project
YangKeao updated the diff for D98789: [PEI] add dwarf information for stack probe.

Use RAX/EAX as the iterate register, as RDX/EDX is used as arguments under systemv

Mar 18 2021, 10:38 AM · Restricted Project
YangKeao updated the diff for D98789: [PEI] add dwarf information for stack probe.

Use RDX/EDX instead of RDI/EDI, as RDI/EDI is callee saved on Win64 calling convension

Mar 18 2021, 9:08 AM · Restricted Project
YangKeao added a comment to D98789: [PEI] add dwarf information for stack probe.

What registers can be used? I did a quick search and couldn't find anything.

Mar 18 2021, 8:45 AM · Restricted Project
YangKeao updated the diff for D98789: [PEI] add dwarf information for stack probe.

reformat the code

Mar 18 2021, 3:21 AM · Restricted Project
YangKeao added inline comments to D98789: [PEI] add dwarf information for stack probe.
Mar 18 2021, 12:44 AM · Restricted Project
YangKeao updated the diff for D98789: [PEI] add dwarf information for stack probe.
  • Use rdi to represent the stack bound and CFA
  • Remove extra tailing offset adjust
Mar 18 2021, 12:40 AM · Restricted Project

Mar 17 2021

YangKeao added a comment to D98789: [PEI] add dwarf information for stack probe.

To clarify, I've done some more reading now, and figured out where I went wrong. For a long time, LLVM did not emit accurate unwind info to describe the prologue/epilogue (and still doesn't on some targets), so I was under the impression it wasn't possible. Clearly, it is, and it's implemented on x86.


The change to use r11 isn't implemented correctly: we can't adjust the stack pointer until *after* we've probed the relevant pages. It'll appear to work, but it won't actually provide complete protection if a signal handler triggers at the wrong time.

Mar 17 2021, 10:22 PM · Restricted Project
YangKeao added a comment to D98789: [PEI] add dwarf information for stack probe.

There has been a bug report for this on bugzilla. A more "downstream" context for this feature is discussed in rust#83139.

Mar 17 2021, 9:22 AM · Restricted Project
YangKeao requested review of D98789: [PEI] add dwarf information for stack probe.
Mar 17 2021, 9:14 AM · Restricted Project