[PATCH] D68063: Propeller: LLVM support for basic block sections
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 16:59:51 PST 2020
MaskRay added inline comments.
================
Comment at: llvm/include/llvm/Target/TargetOptions.h:69
+ namespace BasicBlockSection {
+ enum SectionMode {
+ None, // Do not use Basic Block Sections.
----------------
Newer code should use `enum class` instead of namespace+unscoped enumeration
================
Comment at: llvm/include/llvm/Target/TargetOptions.h:70
+ enum SectionMode {
+ None, // Do not use Basic Block Sections.
+ All, // Use Basic Block Sections for all functions.
----------------
Order enum members by the extent they enable basic block sections.
================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:450
+ /// specified in a file.
+ if (TM && TM->getBBSections() == llvm::BasicBlockSection::All)
+ F.setBBSections(true);
----------------
We probably can make TargetPassConfig required so we don't have to check `TM` nullness everywhere.
Created D73754
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68063/new/
https://reviews.llvm.org/D68063
More information about the llvm-commits
mailing list