[PATCH] D99487: [CodeGen] Port basic block sections from ELF to COFF
TaoPan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 20 00:07:59 PDT 2021
TaoPan added a comment.
In D99487#2698978 <https://reviews.llvm.org/D99487#2698978>, @tmsriram wrote:
>> 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.
>> Basically, this means your code won't assemble with CFI and that is a serious limitation. This is similar to what we did for ELF. All CFI directives should be within a cfi_startproc cfi_endproc directive as part of a single section. When you fragment a function into multiple sections, this breaks. We solved this by adding a separate startproc endproc directive for each section.
>>
>> I have some suggestions for you to better understand the problem:
>>
>> - GCC supports function splitting with -freorder-blocks-and-partition. You can use GCC to split a function and see what it does to cv_loc directives.
>> - D79978 <https://reviews.llvm.org/D79978> is what we did with ELF, my guess is it is very similar. You just need to add a startproc endproc to every function and duplicate all the information to compute Call Frame Address.
>
> https://llvm.org/docs/Extensions.html#codeview-dependent
>
> These aren't the CFI directives and I falsely assumed that. Stems from my misunderstanding of COFF, please take a note of this.
Thanks for your detail guidance! It's very helpful. I'll study what you did with ELF and codeview format.
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