[PATCH] D100735: [CodeGen] Enable Windows exception handling for basic block sections

Di Mo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 18:58:07 PDT 2021


modimo added a comment.

In D100735#2832513 <https://reviews.llvm.org/D100735#2832513>, @TaoPan wrote:

> 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 at 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)?

> 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?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100735/new/

https://reviews.llvm.org/D100735



More information about the llvm-commits mailing list