[PATCH] D99487: [CodeGen] Port basic block sections from ELF to COFF

TaoPan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 14 22:37:48 PDT 2021


TaoPan added a comment.

In D99487#2690162 <https://reviews.llvm.org/D99487#2690162>, @tmsriram wrote:

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

As for CFI, does it need be verified addition to llvm/test/DebugInfo/ tests? If so, could you please guide me how CFI of basic block sections is verified on Linux?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99487



More information about the llvm-commits mailing list