Page MenuHomePhabricator

TaoPan (TaoPan)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 20 2020, 12:33 AM (84 w, 4 d)

Recent Activity

Oct 31 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

Ping.

Oct 31 2021, 11:49 PM · Restricted Project, Restricted Project, Restricted Project

Aug 31 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

Ping.

Aug 31 2021, 6:38 PM · Restricted Project, Restricted Project, Restricted Project

Aug 19 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

Thanks MaskRay for your review comments!

Aug 19 2021, 12:03 AM · Restricted Project, Restricted Project, Restricted Project

Aug 18 2021

TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Fix Windows gnu section name and test case

Aug 18 2021, 11:39 PM · Restricted Project, Restricted Project, Restricted Project

Aug 6 2021

TaoPan added inline comments to D105519: [WebAssembly] Deduplicate imports of the same module name, field name, and type.
Aug 6 2021, 12:42 AM · Restricted Project, lld

Aug 4 2021

TaoPan added inline comments to D105519: [WebAssembly] Deduplicate imports of the same module name, field name, and type.
Aug 4 2021, 6:33 PM · Restricted Project, lld
TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

@rnk Thanks for your review comments! Could you please help to review my reply and new modification?
@MaskRay Could you please also help to review?

Aug 4 2021, 3:04 AM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Change selection of entry block text section from IMAGE_COMDAT_SELECT_ANY to return value of getSelectionForCOFF()

Aug 4 2021, 2:29 AM · Restricted Project, Restricted Project, Restricted Project

Aug 3 2021

TaoPan added a comment to D107422: Fix gcc build error after D105519.

@jpienaar Could you please have a review?

Aug 3 2021, 10:11 PM · Restricted Project
TaoPan requested review of D107422: Fix gcc build error after D105519.
Aug 3 2021, 8:30 PM · Restricted Project

Aug 2 2021

TaoPan added inline comments to D105519: [WebAssembly] Deduplicate imports of the same module name, field name, and type.
Aug 2 2021, 3:33 AM · Restricted Project, lld

Jul 21 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

@rnk could you please have a review of IMAGE_COMDAT_SELECT_XXX modification?

Jul 21 2021, 12:31 AM · Restricted Project, Restricted Project, Restricted Project

Jul 13 2021

TaoPan added inline comments to D99487: [CodeGen] Port basic block sections from ELF to COFF.
Jul 13 2021, 7:24 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Change select of BB sections to IMAGE_COMDAT_SELECT_NODUPLICATES

Jul 13 2021, 6:28 PM · Restricted Project, Restricted Project, Restricted Project

Jul 12 2021

TaoPan added a comment to D100735: [CodeGen] Enable Windows exception handling for basic block sections.

Thanks @modimo for big help!
Any other review comment?

Jul 12 2021, 6:16 PM · Restricted Project

Jul 6 2021

TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

git rebase

Jul 6 2021, 11:18 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Update dependent D99487

Jul 6 2021, 10:01 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D100735: [CodeGen] Enable Windows exception handling for basic block sections.

git rebase

Jul 6 2021, 8:46 PM · Restricted Project
TaoPan added a comment to D100735: [CodeGen] Enable Windows exception handling for basic block sections.
D99487 (parent of the below two patches): BBS basic function on Windows
D100735 (this patch):  BBS exception handling on Windows
D101421: BBS DebugInfo on Windows

Is the plan to commit all of this at once?

Yes.
Could you please review this commit further?

Jul 6 2021, 8:42 PM · Restricted Project

Jul 1 2021

TaoPan added a comment to D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

lgtm

Thanks for your big help!

Jul 1 2021, 8:58 PM · Restricted Project
TaoPan updated the diff for D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

Fix the typo of comment

Jul 1 2021, 8:55 PM · Restricted Project
TaoPan updated the diff for D100735: [CodeGen] Enable Windows exception handling for basic block sections.

Update test for reproducing build error of "<unknown>:0: error: Cannot represent this expression" and fix the error

Jul 1 2021, 6:58 PM · Restricted Project

Jun 28 2021

TaoPan added a comment to D100735: [CodeGen] Enable Windows exception handling for basic block sections.

Cool, feel free to file a bug and link it here to track progress.

This bug depends on #D99487 and this commit, can't be reproduced without these two commits. Is it ok file the bug after landing these two commits?

In that case it would make sense to fix this in D99487. I pulled this down locally and noticed that baseline testing with BBS hits:

llc: /home/modimo/llvm-project/llvm/lib/MC/MCStreamer.cpp:1207: virtual void llvm::MCStreamer::SwitchSection(llvm::MCSection *, const llvm::MCExpr *): Assertion Section && "Cannot switch to a null section!"' failed.`

If you plan on checking this test in early (which I would recommend) before all the other pieces are in place you can replace RUN for BBS with a TODO D99487.

I set D99487 as this patch's parent according to @tmsriram 's comment, it's the reason why the auto test passed but you pull only this down locally and run this test crash. The section of SwitchSection() is created by D99487.
I submitted BBS patches according to purpose:

D99487 (parent of the below two patches): BBS basic function on Windows
D100735 (this patch):  BBS exception handling on Windows
D101421: BBS DebugInfo on Windows

So the upper mentioned bug "with BBS, build fail with "error: Cannot represent this expression", I'm investigating this error" belongs to this patch.

Jun 28 2021, 11:55 PM · Restricted Project
TaoPan updated the diff for D100735: [CodeGen] Enable Windows exception handling for basic block sections.

Fix comment format of test

Jun 28 2021, 6:53 PM · Restricted Project

Jun 27 2021

TaoPan added a comment to D100735: [CodeGen] Enable Windows exception handling for basic block sections.

I tried to build with clang, define it as "main" and add printf to the __except clause

without BBS, the exception can be captured, printf log in __except clause was printed.
with BBS,  build fail with "error: Cannot represent this expression", I'm investigating this error.

Cool, feel free to file a bug and link it here to track progress.

This bug depends on #D99487 and this commit, can't be reproduced without these two commits. Is it ok file the bug after landing these two commits?

I don't know the reason MBB->setIsEHPad() without any MI of the MBB setIsEHLabel() in the case of Windows COFF.

My cursory understanding is that Windows COFF in LLVM uses a different set of intrinsics to represent EH which probably don't fall under EHLabel. There's probably a good reason for that. If this is the case then probably better to guard it like you're currently doing from scanning wastefully. I would guard with if (!<triple for windows>) rather specifically checking for ELF. Also, put the check inside avoidZeroOffsetLandingPad rather than the call to it so the call site doesn't have to be aware of this.

Thanks for your analysis! I changed code according to your guidance.

Jun 27 2021, 11:14 PM · Restricted Project
TaoPan updated the diff for D100735: [CodeGen] Enable Windows exception handling for basic block sections.

Add comment for difference of section number of BASELINE and BBS

Jun 27 2021, 11:05 PM · Restricted Project
TaoPan updated the diff for D100735: [CodeGen] Enable Windows exception handling for basic block sections.

Change CHECK format of test to COMMON, BASELINE, BBS for highlighting difference of BASELINE and BBS.
Change triple condition from COFF to Windows.
Move check of Windows inside avoidZeroOffsetLandingPad.
Add iterator end check for avoiding infinite loop.

Jun 27 2021, 10:43 PM · Restricted Project

Jun 24 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

I reported bugs of using clang-cl and lld to test https://github.com/microsoft/compiler-tests/tree/master/seh

  1. clang-cl.exe + lld linker
Jun 24 2021, 10:50 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan added a comment to D100735: [CodeGen] Enable Windows exception handling for basic block sections.

No big difference. There are 12 more sections in Sections table, I checked asm file, there are 12 BB sections, so all added sections are BB sections. And as the test file CHECK, one relocation of .xdata section changed from ".text" to "?TestCPPEX@@YAXH@Z.__part.3". Is this difference need to add without -basic-block-sections=all -unique-basic-block-section-names case for highlight the difference?

Yeah, check that the .xdata relocation changed and the size of the Sections table (CHECK-COUNT or looking at the last entry for each configuration). Also does the above test case run correctly when built with Clang if you define it as "main" and add something interesting to the __except clause (with and without BBS)?

I added baseline (without BBS) case and check the size of the Sections table.
I tried to build with clang, define it as "main" and add printf to the __except clause

without BBS, the exception can be captured, printf log in __except clause was printed.
with BBS,  build fail with "error: Cannot represent this expression", I'm investigating this error.

FYI, about avoidZeroOffsetLandingPad under MSVC, isFuncletEHPersonality(Pers) check and return of SelectionDAGISel::PrepareEHLandingPad() prevent later addLandingPad(MBB) and adding TargetOpcode::EH_LABEL MachineInstr in the case of MSVC. while (!MI->isEHLabel()) ++MI; of avoidZeroOffsetLandingPad is dead loop as no EHLabel MI in the case of MSVC.

I'm not sure what you mean by dead loop for while (!MI->isEHLabel()) Can you elaborate?

The dead loop occurs if "MBB->setIsEHPad() but all MIs of the MBB are not isEHLabel()", as condition !MI->isEHLabel() of while loop is always true.
Adding "&& MI != MBB.end()" to while (!MI->isEHLabel()) will resolve this dead loop.
The iterator is rolling loop, begin() is next to end(), the '++' operation change the iterator in loop turn, e.g. if size() is 2, the turn of '++' operation is:

begin() (1st node) -> 2nd node -> end() -> begin() (1st node) -> 2nd node -> ....

I don't know the reason MBB->setIsEHPad() without any MI of the MBB setIsEHLabel() in the case of Windows COFF.

Jun 24 2021, 3:35 AM · Restricted Project
TaoPan updated the diff for D100735: [CodeGen] Enable Windows exception handling for basic block sections.

Add baseline case and check size of the Sections table

Jun 24 2021, 2:25 AM · Restricted Project

Jun 23 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

I checked the microsoft SEH tests with

  1. cl.exe

    a. x4ptcu.c: build error
  2. clang-cl.exe + lld linker

    a. x4ptcu.c: build error

    b. seh0015.c, seh0017.c: build crash

    c. seh0034.c, seh0036.c, seh0041~0043.c, seh0048~0050.c, another build crash

    d. seh0020.c, seh0025, seh0026: build error

    e. sehframes.cpp: build pass, run dead loop

Please file bugs for these and if you can bucket the failures that would be even better. Thanks!

I'll file these bugs and try to bucket the failures in parallel.

Jun 23 2021, 8:07 PM · Restricted Project, Restricted Project, Restricted Project

Jun 22 2021

TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Make clang option -fbasic-block-sections and -funique-basic-block-section-names available on Windows COFF.

Jun 22 2021, 8:12 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan added a comment to D100735: [CodeGen] Enable Windows exception handling for basic block sections.

Is there currently a difference in the output when built with -basic-block-sections=all -unique-basic-block-section-names vs. without? If so, should CHECK for both cases to highlight the difference and add some explanatory comments on why a particular transformation took place. What are considered landing pads for avoidZeroOffsetLandingPad under MSVC? I can double-check to make sure they're truly not needed.

Otherwise this looks good and works well as a first step.

Thanks for your comment!
No big difference. There are 12 more sections in Sections table, I checked asm file, there are 12 BB sections, so all added sections are BB sections. And as the test file CHECK, one relocation of .xdata section changed from ".text" to "?TestCPPEX@@YAXH@Z.__part.3". Is this difference need to add without -basic-block-sections=all -unique-basic-block-section-names case for highlight the difference?
FYI, about avoidZeroOffsetLandingPad under MSVC, isFuncletEHPersonality(Pers) check and return of SelectionDAGISel::PrepareEHLandingPad() prevent later addLandingPad(MBB) and adding TargetOpcode::EH_LABEL MachineInstr in the case of MSVC. while (!MI->isEHLabel()) ++MI; of avoidZeroOffsetLandingPad is dead loop as no EHLabel MI in the case of MSVC.

Jun 22 2021, 12:57 AM · Restricted Project

Jun 16 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

Thanks for guiding MSVC's SEH tests! I found the SEH tests use cl (not clang-cl) to compile the c test file https://github.com/microsoft/compiler-tests/blob/2fc7859d212d5fb59628eb21aec50dfb4b934146/seh/runtests.cmd#L8, I'll try to change cl to clang-cl and make sure non-regressed.

Sure, those are the tests run by MSVC for SEH verification which is why it uses cl. Clang-cl sounds good for testing.

Sorry for late feedback of this comment!
I checked the microsoft SEH tests with

  1. cl.exe
Jun 16 2021, 12:52 AM · Restricted Project, Restricted Project, Restricted Project

Jun 15 2021

TaoPan added a comment to D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

Thanks for your review comments!

Jun 15 2021, 11:17 PM · Restricted Project

Jun 8 2021

TaoPan added inline comments to D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.
Jun 8 2021, 12:45 AM · Restricted Project
TaoPan updated the diff for D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

Change condition from MachineBasicBlock is begin section to MachineFunction has BB sections and add comment

Jun 8 2021, 12:41 AM · Restricted Project

Jun 7 2021

TaoPan added inline comments to D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.
Jun 7 2021, 2:03 AM · Restricted Project
TaoPan updated the diff for D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

Don't emit location of BB sections

Jun 7 2021, 1:51 AM · Restricted Project

Jun 1 2021

TaoPan updated the diff for D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

Disable .cv_loc directive emission outside the primary function section.

Jun 1 2021, 10:52 PM · Restricted Project

May 20 2021

TaoPan added inline comments to D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched.
May 20 2021, 7:11 PM · Restricted Project, Restricted Project

May 19 2021

TaoPan added inline comments to D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.
May 19 2021, 1:22 AM · Restricted Project

May 11 2021

TaoPan added inline comments to D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.
May 11 2021, 10:16 PM · Restricted Project
TaoPan updated the summary of D100735: [CodeGen] Enable Windows exception handling for basic block sections.
May 11 2021, 10:04 PM · Restricted Project
TaoPan updated the diff for D100735: [CodeGen] Enable Windows exception handling for basic block sections.

git rebase

May 11 2021, 10:03 PM · Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

git rebase

May 11 2021, 10:02 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

git rebase

May 11 2021, 8:41 PM · Restricted Project

May 10 2021

TaoPan updated the diff for D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

Remove same modification of D100735

May 10 2021, 1:19 AM · Restricted Project
TaoPan updated the summary of D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.
May 10 2021, 1:15 AM · Restricted Project
TaoPan updated the diff for D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

Remove same modification of parent D99487 and add .cv_inline_linetable to test

May 10 2021, 1:13 AM · Restricted Project

May 7 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

The x64 debian failed was introduced by D101797 and is being fixed by https://reviews.llvm.org/rG72bd0116e3a1a70fb52fc47c056349b290ce2204

May 7 2021, 11:39 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D100735: [CodeGen] Enable Windows exception handling for basic block sections.

Remove content of parent D99487 for applying this patch

May 7 2021, 10:28 PM · Restricted Project
TaoPan updated the diff for D100735: [CodeGen] Enable Windows exception handling for basic block sections.

Remove content of parent D99487 for applying this patch

May 7 2021, 10:25 PM · Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

git rebase for triggering auto test

May 7 2021, 10:08 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

git rebase for triggering auto test

May 7 2021, 8:46 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the summary of D99487: [CodeGen] Port basic block sections from ELF to COFF.
May 7 2021, 8:23 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Remove if mingw conditionals of MBB sections.

May 7 2021, 8:20 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan added inline comments to D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched.
May 7 2021, 7:57 PM · Restricted Project, Restricted Project
TaoPan added inline comments to D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched.
May 7 2021, 7:09 PM · Restricted Project, Restricted Project
TaoPan updated the diff for D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched.

Move test back to clang/test/CodeGen/

May 7 2021, 7:05 PM · Restricted Project, Restricted Project
TaoPan updated the summary of D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched.
May 7 2021, 6:44 PM · Restricted Project, Restricted Project
TaoPan added inline comments to D99487: [CodeGen] Port basic block sections from ELF to COFF.
May 7 2021, 2:21 AM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

git rebase

May 7 2021, 2:15 AM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched.

git rebase

May 7 2021, 12:48 AM · Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Change selection of the auxilliary MBB sections to IMAGE_COMDAT_SELECT_ASSOCIATIVE, git rebase, fix comdat name issue

May 7 2021, 12:31 AM · Restricted Project, Restricted Project, Restricted Project

May 6 2021

TaoPan added a comment to D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched.

Thanks Pengfei for your review comments!

May 6 2021, 11:49 PM · Restricted Project, Restricted Project
TaoPan updated the diff for D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched.

Move test from clang/test to llvm/test, remove comma of the last enum item.

May 6 2021, 11:29 PM · Restricted Project, Restricted Project
TaoPan added a reviewer for D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched: pengfei.
May 6 2021, 6:15 PM · Restricted Project, Restricted Project
TaoPan updated subscribers of D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched.
May 6 2021, 6:15 PM · Restricted Project, Restricted Project
TaoPan added reviewers for D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched: RKSimon, craig.topper.

Could you please have a review?

May 6 2021, 6:13 PM · Restricted Project, Restricted Project

Apr 30 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

Thanks all!
I'll take leave between 5.1~5.6 for national holiday and personal affair, I'll response @rnk 's review comment and other further review comment after then.

Apr 30 2021, 2:35 AM · Restricted Project, Restricted Project, Restricted Project
TaoPan added a comment to D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

Thanks for your review comment!
I'll take leave between 5.1~5.6 for national holiday and personal affair, I'll response further review comment after then.

Apr 30 2021, 2:32 AM · Restricted Project
TaoPan updated the diff for D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

Forgot .section directives in the first CHECK of the last update

Apr 30 2021, 1:43 AM · Restricted Project
TaoPan updated the diff for D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.

Add .section directives test

Apr 30 2021, 1:29 AM · Restricted Project
TaoPan requested review of D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched.
Apr 30 2021, 1:10 AM · Restricted Project, Restricted Project

Apr 29 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

Agree with @MaskRay I'd like to see a holistics plan/RFC on all the pieces that are needed to get this functionality. The functionality here is only tested when exceptions are actually propagated which is not common in LLVM test suite. You'll want to run and likely write very specific tests stressing the test matrix here of BBS + MFS + EH. Given all that, a larger plan that details how we can be confident that all the pieces have been accounted for and will be well tested is (IMO) imperative in getting this change reviewed and accepted.

Since this (the test matrix) is already done for ELF, would it be complete if the author added equivalent tests for COFF?

Good point, that sounds like a good avenue to pursue. @snehasish mentions some of these exact tests here https://reviews.llvm.org/D95209#2523227. Looks like there was some movement for these tests here: https://reviews.llvm.org/D96393 although it appears BBS might need Windows debuginfo support for testing. I'm chasing through a bunch of these diffs to figure out what the state of this is and I'm not quite certain what it is. @TaoPan do you have a plan you can share about the progress here so we can follow along?

Apr 29 2021, 11:58 PM · Restricted Project, Restricted Project, Restricted Project

Apr 28 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

For some added testing you can run MSVC's SEH tests to see that this works properly: https://github.com/microsoft/compiler-tests/tree/master/seh. I wouldn't be surprised if not all of these pass in the baseline but we certainly want to make sure the ones that are remain non-regressed.

Apr 28 2021, 7:17 PM · Restricted Project, Restricted Project, Restricted Project

Apr 27 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

Hi tmsriram, MaskRay,

Apr 27 2021, 10:34 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated subscribers of D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.
Apr 27 2021, 9:55 PM · Restricted Project
TaoPan added reviewers for D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections: tmsriram, snehasish, MaskRay, rnk, pengfei.

Could you please have a review?

Apr 27 2021, 9:53 PM · Restricted Project
TaoPan requested review of D101421: [DebugInfo] Enable CodeView DebugInfo for basic block sections.
Apr 27 2021, 7:05 PM · Restricted Project

Apr 20 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

Would you be able to paste the entire assembly with cv loc directives? I can try to take a look.

As the entire assembly has 500 lines, I sent to you through mail, I'll do if you think paste part of them or entire assembly to here is better.

Apr 20 2021, 12:07 AM · Restricted Project, Restricted Project, Restricted Project

Apr 18 2021

TaoPan updated the diff for D100735: [CodeGen] Enable Windows exception handling for basic block sections.

git rebase

Apr 18 2021, 11:39 PM · Restricted Project
TaoPan requested review of D100735: [CodeGen] Enable Windows exception handling for basic block sections.
Apr 18 2021, 6:18 PM · Restricted Project

Apr 16 2021

TaoPan added a comment to D100612: [clangd][test] Fix build error of FeatureModulesTests.

thanks, lgtm! which compiler is this btw?

Apr 16 2021, 1:39 AM · Restricted Project

Apr 15 2021

TaoPan added a comment to D100612: [clangd][test] Fix build error of FeatureModulesTests.

Hi sammccall,

Apr 15 2021, 10:32 PM · Restricted Project
TaoPan requested review of D100612: [clangd][test] Fix build error of FeatureModulesTests.
Apr 15 2021, 6:37 PM · Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

git rebase

Apr 15 2021, 2:08 AM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Simplify text section name code

Apr 15 2021, 12:02 AM · Restricted Project, Restricted Project, Restricted Project

Apr 14 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

This is quite important to validate the correctness of the generated assembly. If you could please check that CFI and DebugInfo are sane before we take this patch forward? Let's get a temperature on how good these are before we decide how to take it forward.

Thanks! I got the importance.
As for DebugInfo, I tried to add "--basic-block-sections=all" to RUN of llvm/test/DebugInfo/COFF/comdat.ll, text sections includes basic block text sections and CodeViewDebugInfo can be created correctly after

  1. apply this patch
  2. commenting out a Linux exception handling protocol dependent function which I plan to do in later basic block section Windows exception handling patch.

There are some non-blocking errors "error: all .cv_loc directives for a function must be in the same section" in llc stage, one error for each basic block, below is the first one.
f.__part.1: # %if.then
#DEBUG_VALUE: f:c <- $ecx
<unknown>:0: error: all .cv_loc directives for a function must be in the same section
.Ltmp3:

Apr 14 2021, 10:37 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

If it is easier for you to break this up, you can present exception handling in a separate patch with a clear "TODO:" at the appropriate places. That should be alright and is also easier to review.

I added "TODO:" for constructing exception section and cold section later.

Apr 14 2021, 2:11 AM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the summary of D99487: [CodeGen] Port basic block sections from ELF to COFF.
Apr 14 2021, 1:33 AM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Add TODO for constructing exception section and cold section later

Apr 14 2021, 1:32 AM · Restricted Project, Restricted Project, Restricted Project

Apr 5 2021

TaoPan added a comment to D99487: [CodeGen] Port basic block sections from ELF to COFF.

Hi tmsriram, MaskRay,

Apr 5 2021, 7:14 PM · Restricted Project, Restricted Project, Restricted Project

Mar 31 2021

TaoPan added inline comments to D99487: [CodeGen] Port basic block sections from ELF to COFF.
Mar 31 2021, 6:08 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

git rebase

Mar 31 2021, 5:48 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Simplify condition of setting COFF::IMAGE_SCN_LNK_COMDAT

Mar 31 2021, 5:45 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

Conditionally set COFF::IMAGE_SCN_LNK_COMDAT, add mtriple x86_64-windows-gnu support

Mar 31 2021, 2:33 AM · Restricted Project, Restricted Project, Restricted Project

Mar 29 2021

TaoPan added inline comments to D99487: [CodeGen] Port basic block sections from ELF to COFF.
Mar 29 2021, 11:16 PM · Restricted Project, Restricted Project, Restricted Project
TaoPan updated the diff for D99487: [CodeGen] Port basic block sections from ELF to COFF.

git rebase

Mar 29 2021, 1:59 AM · Restricted Project, Restricted Project, Restricted Project