Page MenuHomePhabricator

dongAxis1944 (Yifeng Dong)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 11 2020, 11:19 PM (104 w, 5 d)

Recent Activity

Feb 15 2022

dongAxis1944 added inline comments to D113193: [TwoAddressInstructionPass] Create register mapping for registers with multiple uses in the current MBB.
Feb 15 2022, 12:24 AM · Restricted Project

Feb 5 2022

dongAxis1944 added a comment to D118346: [ORC] Support ADR_PREL_PG_HI21 & ADD_ABS_LO12_NC for aarch64.

Thanks for the patch. I can't dig into the details deeper right now, but if the test issues remain I do so next week.

Feb 5 2022, 7:14 AM · Restricted Project, Restricted Project

Jan 30 2022

dongAxis1944 added a comment to D118346: [ORC] Support ADR_PREL_PG_HI21 & ADD_ABS_LO12_NC for aarch64.

Reviewing the patch as-is because I think it's a great addition. If work on the ELF/aarch64 backend is starting in earnest though I would prefer to create a new generic aarch64.h header (along the lines of riscv.h and x86_64.h) and populate it with the existing MachO relocations -- the fixup logic is generally sharable, so there shouldn't be any need to duplicate it, though ELF will probably require some extra relocations beyond the set MachO uses.

If that sounds good to you I'll try to find some time to do that next week.

Jan 30 2022, 12:45 AM · Restricted Project, Restricted Project

Jan 28 2022

dongAxis1944 updated the diff for D118346: [ORC] Support ADR_PREL_PG_HI21 & ADD_ABS_LO12_NC for aarch64.

fix compile error

Jan 28 2022, 12:11 AM · Restricted Project, Restricted Project

Jan 27 2022

dongAxis1944 added inline comments to D118346: [ORC] Support ADR_PREL_PG_HI21 & ADD_ABS_LO12_NC for aarch64.
Jan 27 2022, 3:45 AM · Restricted Project, Restricted Project
dongAxis1944 added reviewers for D118346: [ORC] Support ADR_PREL_PG_HI21 & ADD_ABS_LO12_NC for aarch64: sgraenitz, lhames.
Jan 27 2022, 3:40 AM · Restricted Project, Restricted Project
dongAxis1944 updated the diff for D118346: [ORC] Support ADR_PREL_PG_HI21 & ADD_ABS_LO12_NC for aarch64.

update patch

Jan 27 2022, 3:39 AM · Restricted Project, Restricted Project
dongAxis1944 requested review of D118346: [ORC] Support ADR_PREL_PG_HI21 & ADD_ABS_LO12_NC for aarch64.
Jan 27 2022, 3:36 AM · Restricted Project, Restricted Project

Jan 26 2022

dongAxis1944 committed rGdf597bf000b5: [NFC][ORC][AArch64] use isInt<N> to replace fitsRangeSignedInt on aarch64 (authored by dongAxis1944).
[NFC][ORC][AArch64] use isInt<N> to replace fitsRangeSignedInt on aarch64
Jan 26 2022, 7:27 AM
dongAxis1944 closed D118231: [ORC][AArch64] use isInt<N> to replace fitsRangeSignedInt on aarch64.
Jan 26 2022, 7:27 AM · Restricted Project
dongAxis1944 added a comment to D118231: [ORC][AArch64] use isInt<N> to replace fitsRangeSignedInt on aarch64.

This is from llvm/Support/MathExtras.h right? Can you add it as an explicit include please? Otherwise LGTM.

Jan 26 2022, 7:07 AM · Restricted Project
dongAxis1944 updated the diff for D118231: [ORC][AArch64] use isInt<N> to replace fitsRangeSignedInt on aarch64.

update patch

Jan 26 2022, 3:05 AM · Restricted Project
dongAxis1944 requested review of D118231: [ORC][AArch64] use isInt<N> to replace fitsRangeSignedInt on aarch64.
Jan 26 2022, 2:59 AM · Restricted Project

Dec 16 2021

dongAxis1944 added a comment to D115855: [NFC][SuffixTree] Add debug log and some comments for suffix tree.

This may greatly increase memory usage. You can use #ifndef NDEBUG to not affect production usage.

BTW, I found the suffix tree does not have a default terminator in the array.

A (generalized) suffix tree does not necessarily need the '\0' terminal character as some textbooks require. See https://codeforces.com/blog/entry/16780

Dec 16 2021, 10:12 PM · Restricted Project
dongAxis1944 updated the diff for D115855: [NFC][SuffixTree] Add debug log and some comments for suffix tree.

address comment

Dec 16 2021, 10:08 PM · Restricted Project
dongAxis1944 added a reviewer for D115855: [NFC][SuffixTree] Add debug log and some comments for suffix tree: paquette.
Dec 16 2021, 1:09 AM · Restricted Project
dongAxis1944 updated the diff for D115855: [NFC][SuffixTree] Add debug log and some comments for suffix tree.
Dec 16 2021, 12:07 AM · Restricted Project
dongAxis1944 updated the summary of D115855: [NFC][SuffixTree] Add debug log and some comments for suffix tree.
Dec 16 2021, 12:02 AM · Restricted Project
dongAxis1944 added a reviewer for D115855: [NFC][SuffixTree] Add debug log and some comments for suffix tree: AndrewLitteken.
Dec 16 2021, 12:01 AM · Restricted Project
dongAxis1944 retitled D115855: [NFC][SuffixTree] Add debug log and some comments for suffix tree from [NFC] Add debug log and some comments for suffixtree to [NFC][SuffixTree] Add debug log and some comments for suffix tree.
Dec 16 2021, 12:00 AM · Restricted Project

Dec 15 2021

dongAxis1944 requested review of D115855: [NFC][SuffixTree] Add debug log and some comments for suffix tree.
Dec 15 2021, 11:59 PM · Restricted Project

Jul 8 2021

dongAxis1944 added a comment to D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".

gentle ping @spatel @lebedev.ri

Jul 8 2021, 11:26 PM · Restricted Project

Jun 30 2021

dongAxis1944 updated the diff for D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".

address comment

Jun 30 2021, 9:52 AM · Restricted Project
dongAxis1944 updated the diff for D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".

format the patch

Jun 30 2021, 6:46 AM · Restricted Project
dongAxis1944 updated the diff for D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".

address the comment

Jun 30 2021, 6:19 AM · Restricted Project

Jun 29 2021

dongAxis1944 added inline comments to D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".
Jun 29 2021, 7:47 AM · Restricted Project
dongAxis1944 updated the diff for D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".

remove useless ut

Jun 29 2021, 7:45 AM · Restricted Project

Jun 28 2021

dongAxis1944 updated the diff for D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".

@spatel thanks, I update the case, and I prefer use the new file, because the old case might not be clear to find I think.

Jun 28 2021, 11:58 PM · Restricted Project
dongAxis1944 updated the diff for D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".

add pattern in valuetrack

Jun 28 2021, 7:27 AM · Restricted Project
dongAxis1944 updated the diff for D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".

fix wrong comment

Jun 28 2021, 6:16 AM · Restricted Project
dongAxis1944 updated the diff for D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".

modify code , the original code is wrong

Jun 28 2021, 6:14 AM · Restricted Project
dongAxis1944 added a comment to D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".

The missing fold here is: https://alive2.llvm.org/ce/z/7uIb0B (i.e. it should go into haveNoCommonBitsSet())
And this will automagically fold to or, not xor: https://godbolt.org/z/6svT3vc44

Jun 28 2021, 5:51 AM · Restricted Project
dongAxis1944 added reviewers for D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B": sebastian-ne, spatel, lebedev.ri.
Jun 28 2021, 4:45 AM · Restricted Project
dongAxis1944 requested review of D105013: [InstCombine] try to fold the expression "(A & ~B) + B" to "A | B".
Jun 28 2021, 4:41 AM · Restricted Project

May 28 2021

dongAxis1944 committed rG66ff1cbd71d2: [NFC][Transforms][Utils] remove useless variable in CloneBasicBlock (authored by dongAxis1944).
[NFC][Transforms][Utils] remove useless variable in CloneBasicBlock
May 28 2021, 2:51 AM

May 7 2021

dongAxis1944 updated the diff for D101353: [DebugInfo] do not add pc value if lsda value in fde is 0.

Address the comments and add the unit test

May 7 2021, 2:57 AM · Restricted Project

Apr 28 2021

dongAxis1944 added a comment to D101353: [DebugInfo] do not add pc value if lsda value in fde is 0.

Hi @dongAxis1944, thanks for submitting this!

But the LDSA value is zero in FDE, in this case llvm should set lsda value to 0 even if LSDA is relative to pc.

I don't understand why is zero special? We know it looks wrong because no LSDA would ever be encoded with a zero offset from the current address. But in that logic, 1 or 2 is also wrong, and so on. This looks like a special case to account for a bug in the compiler, is that right? What is the compiler that is generating that and why? It would be good to get to the bottom of that before special casing the parser library.

I'm saying this because if the violating FDE entry with LSDA set to 0 is being generated by source code written in assembly language that just happens to be coded by someone writing incorrect FDE metadata, it seems wrong to adapt the parser library to swallow that mistake -- and the source code should be fixed instead.

Apr 28 2021, 7:43 AM · Restricted Project
dongAxis1944 added a comment to D101353: [DebugInfo] do not add pc value if lsda value in fde is 0.

A test plan of check-llvm is not sufficient. It shows that you didn't break anything that we have an existing test for, but it would also suggest that there is no test for this case, and you want that so someone else doesn't break your change in the future.

Apr 28 2021, 5:04 AM · Restricted Project

Apr 27 2021

dongAxis1944 added a comment to D101353: [DebugInfo] do not add pc value if lsda value in fde is 0.

@rafaelauler. this case is related to the issue https://github.com/facebookincubator/BOLT/issues/141 in Bolt project.

Apr 27 2021, 4:20 AM · Restricted Project
dongAxis1944 requested review of D101353: [DebugInfo] do not add pc value if lsda value in fde is 0.
Apr 27 2021, 4:18 AM · Restricted Project

Apr 21 2021

dongAxis1944 accepted D100298: [Clang][Coroutine][DebugInfo] Follow-up: reduce a tests ordering requirements.

LGTM

Apr 21 2021, 9:44 PM · Restricted Project
dongAxis1944 updated subscribers of D97891: Add register size info back to MCRegisterClass.

If you need this I'd rather "add the needed support" than doing it as a revert

Sounds good, let me work on that a little bit.

Regarding where is this used, the dependency of BOLT on this interface is a single line here:
https://github.com/facebookincubator/BOLT/blob/master/src/MCPlusBuilder.cpp#L445
and here
https://github.com/facebookincubator/BOLT/blob/master/src/Target/X86/X86MCPlusBuilder.cpp#L1417

BOLT offers a framework for running dataflow analyses on binaries. We use it to perform shrinkwrapping, for example. For this to happen, we need to know the register size when analyzing an MCInst to figure out how wide is the load or store to stack. With this information, we build a model of which bytes of the stack are being used and how, and if we have enough information to move load/stores to colder positions.

This register size information is exposed inside BOLT though an interface that abstracts away all target information. When writing a pass in BOLT, you may query, then, whether registers alias with each other and their size. As you can imagine, this is provided by MC. BOLT builds the size information straight out of the tablegen'd specs of the target though MC. I tried to move this logic to use TRI, but TRI is only available to code living inside libTarget. To an external tool like BOLT that relies a lot on the MC library, it is not possible to fetch it though libTarget unless we create an interface in libTarget to expose this information, which I think would be awkward.

Apr 21 2021, 7:49 PM · Restricted Project

Apr 15 2021

dongAxis1944 added a comment to D100298: [Clang][Coroutine][DebugInfo] Follow-up: reduce a tests ordering requirements.

@jmorse I am not familiar with CHECK-DAG. And @probinson 's suggestion might be useful, any ideas?

Apr 15 2021, 2:43 AM · Restricted Project

Apr 9 2021

dongAxis1944 updated the diff for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

use isa_and_nonnull instead of isa....

Apr 9 2021, 2:29 AM · Restricted Project, debug-info
dongAxis1944 updated the diff for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

fix compile error

Apr 9 2021, 1:05 AM · Restricted Project, debug-info
dongAxis1944 updated the summary of D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.
Apr 9 2021, 12:16 AM · Restricted Project, debug-info
dongAxis1944 added inline comments to D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.
Apr 9 2021, 12:00 AM · Restricted Project, debug-info

Apr 8 2021

dongAxis1944 updated the diff for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

update common and fix code style as suggested

Apr 8 2021, 11:57 PM · Restricted Project, debug-info

Apr 6 2021

dongAxis1944 added a comment to D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

The test now passes without the rest of the patch applied; as mentioned above, it needs to affirmatively identify the contents of retainedNodes to guarantee detection of extra entries. Alternately, use CHECK-NOT or --implicit-check-not to confirm the absence of the extra DILocalVariables.

That being said, looking at the output of clang @ 880822255e21 on this test, it looks like the retainedNodes field isn't populated for coroutines -- all the DISubprograms have "!{}" for the field. That feels like a bug to me, as any variables completely optimised out will not have their type / declaration information represented in the DWARF output. (I assume there isn't a design change with the representation of coroutine DISubprograms that explains this).

Specifically, in DISubprograms like:

!2 = !{}
!140 = distinct !DISubprogram(name: "f_coro", linkageName: "_Z6f_coroi8MoveOnly11MoveAndCopy", scope: !8, file: !8, line: 60, type: !9, scopeLine: 60, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
!143 = !DILocalVariable(name: "mcParam", scope: !140, type: !28, flags: DIFlagArtificial)
!144 = !DILocalVariable(name: "moParam", scope: !140, type: !12, flags: DIFlagArtificial)
!145 = !DILocalVariable(name: "val", scope: !140, type: !11, flags: DIFlagArtificial)

retainedNodes should be metadata with contents !{!143, !144, !145}

Apr 6 2021, 8:46 PM · Restricted Project, debug-info
dongAxis1944 updated the diff for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

Use CHECK-NOT to confirm the absence of the extra DILocalVariables.

Apr 6 2021, 8:43 PM · Restricted Project, debug-info

Apr 1 2021

dongAxis1944 added inline comments to D99048: [RFC][DebugInfo] Do not use the DBG_VALUE to calculate debug info of spill location.
Apr 1 2021, 6:53 PM · Restricted Project

Mar 31 2021

dongAxis1944 added a comment to D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

The test now passes without the rest of the patch applied; as mentioned above, it needs to affirmatively identify the contents of retainedNodes to guarantee detection of extra entries. Alternately, use CHECK-NOT or --implicit-check-not to confirm the absence of the extra DILocalVariables.

That being said, looking at the output of clang @ 880822255e21 on this test, it looks like the retainedNodes field isn't populated for coroutines -- all the DISubprograms have "!{}" for the field. That feels like a bug to me, as any variables completely optimised out will not have their type / declaration information represented in the DWARF output. (I assume there isn't a design change with the representation of coroutine DISubprograms that explains this).

Specifically, in DISubprograms like:

!2 = !{}
!140 = distinct !DISubprogram(name: "f_coro", linkageName: "_Z6f_coroi8MoveOnly11MoveAndCopy", scope: !8, file: !8, line: 60, type: !9, scopeLine: 60, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
!143 = !DILocalVariable(name: "mcParam", scope: !140, type: !28, flags: DIFlagArtificial)
!144 = !DILocalVariable(name: "moParam", scope: !140, type: !12, flags: DIFlagArtificial)
!145 = !DILocalVariable(name: "val", scope: !140, type: !11, flags: DIFlagArtificial)

retainedNodes should be metadata with contents !{!143, !144, !145}

Mar 31 2021, 12:05 AM · Restricted Project, debug-info

Mar 30 2021

dongAxis1944 added inline comments to D99048: [RFC][DebugInfo] Do not use the DBG_VALUE to calculate debug info of spill location.
Mar 30 2021, 1:51 AM · Restricted Project

Mar 24 2021

dongAxis1944 added inline comments to D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.
Mar 24 2021, 9:42 PM · Restricted Project, debug-info
dongAxis1944 updated the diff for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

fix some comment styles

Mar 24 2021, 9:36 PM · Restricted Project, debug-info
dongAxis1944 updated the diff for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

reflect the code, and fix some code style and comment style

Mar 24 2021, 8:54 PM · Restricted Project, debug-info
dongAxis1944 added a comment to D99048: [RFC][DebugInfo] Do not use the DBG_VALUE to calculate debug info of spill location.

I just upload the c++ file for testing.

Mar 24 2021, 7:50 PM · Restricted Project
dongAxis1944 added inline comments to D99048: [RFC][DebugInfo] Do not use the DBG_VALUE to calculate debug info of spill location.
Mar 24 2021, 6:40 PM · Restricted Project
dongAxis1944 added inline comments to D99048: [RFC][DebugInfo] Do not use the DBG_VALUE to calculate debug info of spill location.
Mar 24 2021, 6:36 PM · Restricted Project
dongAxis1944 added a comment to D99048: [RFC][DebugInfo] Do not use the DBG_VALUE to calculate debug info of spill location.

Hmmmm, do you have a reduced reproducer in llvm-ir that could go in a bug report? There are a number of things that could be going on here, and we can't be sure which without an example.

Given that the assembly you're using features a stack spill slot being shared by two values, I'd bet on stack slot colouring merging two slots and not modifying debug-info. Alternately, there are certain DBG_VALUEs that LiveDebugVariables produces which are hard for LiveDebugValues to interpret.

For the actual modification in this patch:

  • I'm not sure what to make of the inliner codegen changes,
  • The VarLocBasedImpl LiveDebugValues change will drop a lot of other variable locations, which is undesirable.
Mar 24 2021, 6:32 PM · Restricted Project

Mar 22 2021

dongAxis1944 added a comment to D99048: [RFC][DebugInfo] Do not use the DBG_VALUE to calculate debug info of spill location.

Since this is RFC, so I do not fix ut of LLVM.

Mar 22 2021, 7:10 PM · Restricted Project

Mar 21 2021

dongAxis1944 added reviewers for D99048: [RFC][DebugInfo] Do not use the DBG_VALUE to calculate debug info of spill location: mkuper, StephenTozer, jmorse.
Mar 21 2021, 8:31 PM · Restricted Project
dongAxis1944 requested review of D99048: [RFC][DebugInfo] Do not use the DBG_VALUE to calculate debug info of spill location.
Mar 21 2021, 8:27 PM · Restricted Project

Mar 16 2021

dongAxis1944 added a comment to D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

@aprantl gentle ping~

Mar 16 2021, 3:01 AM · Restricted Project, debug-info
dongAxis1944 added reviewers for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters: rjmccall, ychen, lewissbaker.
Mar 16 2021, 2:57 AM · Restricted Project, debug-info
dongAxis1944 added a reviewer for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters: lxfind.
Mar 16 2021, 2:56 AM · Restricted Project, debug-info

Mar 15 2021

Herald added a project to D41226: [LiveDebugValues] recognize spilled register that is killed in instruction after the spill: Restricted Project.
Mar 15 2021, 2:07 AM · Restricted Project
dongAxis1944 added a reviewer for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters: bruno.
Mar 15 2021, 12:40 AM · Restricted Project, debug-info

Mar 9 2021

dongAxis1944 updated the diff for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

update patch for fixing duplicate variables

Mar 9 2021, 5:28 PM · Restricted Project, debug-info

Mar 7 2021

dongAxis1944 added inline comments to D93838: [SCCP] Add Function Specialization pass.
Mar 7 2021, 6:26 PM · Restricted Project

Mar 6 2021

dongAxis1944 removed 1 auditor(s) for rGfb2cf0dd6092: [FunctionImport] Delete unneeded setLive. NFC: dongAxis1944.
Mar 6 2021, 5:13 PM
dongAxis1944 removed 1 auditor(s) for rGe6a104465d9b: [ModuleSummaryAnalysis] Avoid duplicate elements in Worklist. NFC: dongAxis1944.
Mar 6 2021, 5:12 PM
dongAxis1944 removed 1 auditor(s) for rGd96af2ed2d6c: [MC] Support .symver *, *, remove: dongAxis1944.
Mar 6 2021, 5:12 PM
dongAxis1944 removed 1 auditor(s) for rGfd785f98aaea: [MC] Parse end-of-line for .cfi_* directives: dongAxis1944.
Mar 6 2021, 5:11 PM
dongAxis1944 removed 1 auditor(s) for rGe5eb3e3836a7: [MC] Parse end-of-line for .addrsig & .addrsig_sym: dongAxis1944.
Mar 6 2021, 5:11 PM

Mar 4 2021

dongAxis1944 added inline comments to D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.
Mar 4 2021, 11:58 PM · Restricted Project, debug-info
dongAxis1944 updated the diff for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

fix code format

Mar 4 2021, 11:35 PM · Restricted Project, debug-info
dongAxis1944 added inline comments to D93838: [SCCP] Add Function Specialization pass.
Mar 4 2021, 12:02 AM · Restricted Project

Mar 3 2021

dongAxis1944 added a comment to D93838: [SCCP] Add Function Specialization pass.

Could you please rebase the code? The latest SCCP code have a few changes.

Mar 3 2021, 11:43 PM · Restricted Project
dongAxis1944 abandoned D94388: [Coroutine][DebugInfo] Enhance the ability of coroutine to debug parameters under O2.
Mar 3 2021, 9:52 PM · Restricted Project
dongAxis1944 added a comment to D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

Most folks have other duties beside the contribution here and they may have a large queue of reviews. The community convention is one ping per week.

On the flip side, please *do* make use of that weekly ping, because everybody is very busy and it's quite easy to loose track of open reviews.

Mar 3 2021, 6:12 PM · Restricted Project, debug-info

Feb 28 2021

dongAxis1944 added a comment to D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

Most folks have other duties beside the contribution here and they may have a large queue of reviews. The community convention is one ping per week.

Feb 28 2021, 10:21 PM · Restricted Project, debug-info
dongAxis1944 added a comment to D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

@aprantl @JDevlieghere @akhuang @MaskRay ping...

Feb 28 2021, 5:53 PM · Restricted Project, debug-info

Feb 26 2021

dongAxis1944 updated the diff for D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.

update path for code formtting

Feb 26 2021, 1:43 AM · Restricted Project, debug-info
dongAxis1944 requested review of D97533: [Clang][Coroutine][DebugInfo] remove useless debug info for coroutine parameters.
Feb 26 2021, 12:33 AM · Restricted Project, debug-info

Feb 24 2021

dongAxis1944 added a comment to D97345: Improve the debug info for coro-split .resume functions.

@aprantl
hello, this patch might cause debug llvm crash, the backtrace is :
#0 0x00007ffff672f8af in raise () from /lib64/libc.so.6
#1 0x00007ffff67314aa in abort () from /lib64/libc.so.6
#2 0x00007ffff6727d37 in assert_fail_base () from /lib64/libc.so.6
#3 0x00007ffff6727de2 in
assert_fail () from /lib64/libc.so.6
#4 0x00000000063af226 in llvm::DwarfUnit::applySubprogramDefinitionAttributes (this=0x13e3f980, SP=0x13fdd8f0, SPDie=...) at /disk1/yifeng.dongyifeng/my_code/llvm/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1169
#5 0x00000000063af368 in llvm::DwarfUnit::applySubprogramAttributes (this=0x13e3f980, SP=0x13fdd8f0, SPDie=..., SkipSPAttributes=false) at /disk1/yifeng.dongyifeng/my_code/llvm/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1193
#6 0x0000000006435376 in llvm::DwarfCompileUnit::applySubprogramAttributesToDefinition (this=0x13e3f980, SP=0x13fdd8f0, SPDie=...) at /disk1/yifeng.dongyifeng/my_code/llvm/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1448

Feb 24 2021, 3:43 AM · Restricted Project

Feb 23 2021

dongAxis1944 added a comment to D94388: [Coroutine][DebugInfo] Enhance the ability of coroutine to debug parameters under O2.

As @junparser mentioned, there are some senses that both variables will be used. When it happens, gdb or lldb will fail to print some variables under o1 and above.

For solving this problems, we would like to merge two variables into one.
Do you have any suggestions?
Feb 23 2021, 9:17 PM · Restricted Project

Feb 2 2021

dongAxis1944 added a comment to D94388: [Coroutine][DebugInfo] Enhance the ability of coroutine to debug parameters under O2.

Maybe we can make the two "variables" use only one dwarf var.
It might solve this problem, I think. Do you have any ideas?

Feb 2 2021, 5:06 AM · Restricted Project
Herald added a project to D37311: [DebugInfo] Lower dbg.declare to DBG_VALUE with DW_OP_deref: Restricted Project.
Feb 2 2021, 4:56 AM · Restricted Project

Feb 1 2021

dongAxis1944 added a comment to D94388: [Coroutine][DebugInfo] Enhance the ability of coroutine to debug parameters under O2.
Feb 1 2021, 11:02 PM · Restricted Project

Jan 27 2021

dongAxis1944 added inline comments to D93838: [SCCP] Add Function Specialization pass.
Jan 27 2021, 6:50 AM · Restricted Project

Jan 26 2021

dongAxis1944 added a comment to D93497: Salvage debug info for function arguments in coro-split funclets..

we might use another patch to rewrite the additional parameters, I think.
Dose anyone has some ideas?

Jan 26 2021, 1:20 AM · Restricted Project

Jan 24 2021

dongAxis1944 added a comment to D93497: Salvage debug info for function arguments in coro-split funclets..

thanks, i will check the patch asap.

Jan 24 2021, 9:09 PM · Restricted Project

Jan 18 2021

dongAxis1944 added inline comments to D93838: [SCCP] Add Function Specialization pass.
Jan 18 2021, 7:32 PM · Restricted Project

Jan 14 2021

dongAxis1944 added a comment to D94388: [Coroutine][DebugInfo] Enhance the ability of coroutine to debug parameters under O2.

I think if we use fake variable to solve this, it might cause the patch https://reviews.llvm.org/D93497 fail to print variable under O0 level

Do we understand *why* the frontend is emitting the variables twice? If that just a bug in the clang frontend (which would be my first guess) then we should aim at fixing the frontend instead. If the frontend is trying to do something different, I would love to understand what that is.

Hi @aprantl,
According to the standard, coroutine needs to copy parameters (calling constructor) passed to the coroutine function by the original caller into the coroutine frame. So in frontend, we fake local variables for this behavior, that why we see two variables in debuginfo.

So, this is not the bug, shold we avoid this by using anonymous fake variables?

Jan 14 2021, 10:55 PM · Restricted Project

Jan 13 2021

dongAxis1944 added a comment to D94388: [Coroutine][DebugInfo] Enhance the ability of coroutine to debug parameters under O2.

i will upadte patch and remove DeleteUselessDbgInfo

Jan 13 2021, 6:18 PM · Restricted Project

Jan 12 2021

dongAxis1944 added a comment to D94388: [Coroutine][DebugInfo] Enhance the ability of coroutine to debug parameters under O2.

Thanks for reviewing, I learn a lot.

Jan 12 2021, 9:42 PM · Restricted Project
dongAxis1944 added a comment to D93497: Salvage debug info for function arguments in coro-split funclets..

I do not see any other problems, but if the code use c++ program, it will cause lldb read invalid address like I write before:

Jan 12 2021, 7:57 PM · Restricted Project

Jan 11 2021

dongAxis1944 added a reviewer for D94388: [Coroutine][DebugInfo] Enhance the ability of coroutine to debug parameters under O2: ChuanqiXu.
Jan 11 2021, 9:26 PM · Restricted Project
dongAxis1944 added a comment to D93497: Salvage debug info for function arguments in coro-split funclets..

yes, clang will emit parameters of coroutine twice. so i use the patch to avoid this: https://reviews.llvm.org/D94388

Jan 11 2021, 9:13 PM · Restricted Project