[PATCH] D81775: [COFF] Add .llvm.call-graph-profile and `--coff-cg-profile` dumpping
Zequan Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 15 17:09:09 PDT 2020
zequanwu marked an inline comment as done.
zequanwu added inline comments.
================
Comment at: llvm/lib/MC/MCParser/COFFAsmParser.cpp:307
+bool COFFAsmParser::ParseDirectiveCGProfile(StringRef, SMLoc) {
+ StringRef From;
+ SMLoc FromLoc = getLexer().getLoc();
----------------
MaskRay wrote:
> If the code duplicates ELFAsmParser, please move it to `AsmParser::`
Not exactly the same. See the comment below.
================
Comment at: llvm/tools/llvm-readobj/COFFDumper.cpp:1974
+
+void COFFDumper::printCGProfile() {
+ object::SectionRef CGProfileSection;
----------------
jhenderson wrote:
> I've not looked into whether this is possible, but if it is, it might be nice to share at least some of the COFF and ELF code, since presumably the section format is identical in both cases.
COFF.h lack some functionalities to do the same parsing as ELF.h. I think this is also why the parsing of `Addrsig` section in COFF doesn't share any code with ELF, even if the section format is identical in both cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81775/new/
https://reviews.llvm.org/D81775
More information about the llvm-commits
mailing list