[PATCH] D73674: Propeller: LLVM support for basic block sections (Base Patch - Part 2)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 26 17:48:45 PST 2020
efriedma added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/MachineBasicBlock.h:147
+ /// Stores the Section type of the basic block with basic block sections.
+ MachineBasicBlockSection SectionType = MBBS_None;
+
----------------
tmsriram wrote:
> efriedma wrote:
> > I'd like to have MIR support for serializing/deserializing the SectionType, so we can test the BBSectionsPrepare pass separately from the passes that run after it and the asmprinter.
> * Function attribute is one way I suppose but if the sections need to be created only for a subset of basic blocks then we would need to emit metadata?
>
> * I thought of emitting a function attribute like "bbsections" with a string value which encodes the basic block ids that require sections.
>
> Thoughts?
We can print/parse data for MachineBasicBlocks directly. We do this for other bits of data stored on MachineBasicBlock. See `MIPrinter::print(const MachineBasicBlock &MBB)`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73674/new/
https://reviews.llvm.org/D73674
More information about the llvm-commits
mailing list