[PATCH] D73739: Exception support for basic block sections
Rahman Lavaee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 11:44:26 PDT 2020
rahmanl added inline comments.
================
Comment at: llvm/lib/CodeGen/BasicBlockSections.cpp:298
+ ++MI;
+ MF.getSubtarget().getInstrInfo()->insertNoop(MBB, MI);
+ break;
----------------
MaskRay wrote:
> rahmanl wrote:
> > modimo wrote:
> > > Using getNoop this should look something like:
> > > ```
> > > MCInst Noop;
> > > MF.getSubtarget().getInstrInfo()->getNoop(Noop);
> > > BuildMI(MBB, MI, DL, MF.getSubtarget().getInstrInfo()->get(Noop.getOpcode()));
> > > ```
> > > I would also create a function to encapsulate this. Logically I think this fits here since you want to do this after `MF.assignBeginEndSections();` but before `updateBranches(MF, PreLayoutFallThroughs);` however the naming of `sortBasicBlocksAndUpdateBranches` is now not accurate. Personally I think a rename to `finalizeBasicBlocks` would work but I'll let @snehasish chime in here.
> > Great suggestion.
> > I added a new function avoidZeroOffsetLandingPad which can also be used in MachineFunctionSpliter.
> Where will avoidZeroOffsetLandingPad used elsewhere?
You're right. It's not used anywhere else right now. So I am going to make it static for now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73739/new/
https://reviews.llvm.org/D73739
More information about the llvm-commits
mailing list