[PATCH] D101311: Basic block sections for functions with implicit-section-name attribute
Sriraman Tallam via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 10:51:19 PDT 2021
tmsriram created this revision.
tmsriram added reviewers: rahmanl, snehasish.
Herald added subscribers: pengfei, hiraditya.
tmsriram requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Functions can have section names set via #pragma or section attributes, basic block sections should be correctly named for such functions.
With #pragma, the expectation is that all functions in that file are placed in the same section in the final binary. Basic block sections should be correctly named with the unique flag set so that the final binary has all the
basic blocks of the function in that named section. This patch fixes the bug by calling getExplictSectionGlobal when implicit-section-name attribute is set to make sure the function's basic blocks get the correct section name.
https://reviews.llvm.org/D101311
Files:
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/test/CodeGen/X86/basic-block-sections-pragma-sections.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101311.340585.patch
Type: text/x-patch
Size: 9183 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210426/2f93ee68/attachment.bin>
More information about the llvm-commits
mailing list