[PATCH] D76954: LLVM support for BB-cluster sections

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 17:24:28 PDT 2020


rahmanl marked 5 inline comments as done.
rahmanl added a comment.

Thanks a lot for your insightful comments @eli.friedman. I think removing the hasBBSections() calls from AsmPrinter.cpp has made the code a lot better.



================
Comment at: llvm/lib/CodeGen/MIRParser/MIRParser.cpp:51
+/// and the SectionID's are assigned to MBBs.
+static void assignBeginEndSections(MachineFunction &MF) {
+  MF.front().setIsBeginSection();
----------------
efriedma wrote:
> Why are there two copies of assignBeginEndSections ?
This function is defined to set IsBeginSection and IsEndSection which are derived from SectionID fields and the MBB order of the function. So we just need to iterate over all MBBs once and assign the fields.

I initially had defined it in MachineFunction.h and then decided to duplicate the code in the two places it is required as per @tmsriram .

I now made the MIRParser's version and external function. Do you have a better suggestion?



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76954/new/

https://reviews.llvm.org/D76954





More information about the llvm-commits mailing list