[PATCH] D113424: ext-tsp basic block layout
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 1 15:30:10 PST 2021
davidxl added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineBlockPlacement.cpp:3472
+ int NumInsts = std::distance(NonDbgInsts.begin(), NonDbgInsts.end());
+ BlockSizes[BlockIndex[&MBB]] = 4 * NumInsts;
+ // Getting jump frequencies.
----------------
spupyrev wrote:
> davidxl wrote:
> > Why not computing the actual byte size of the block?
> That would be great! Do you mind pointing to the right way of implementing this? I was not able to find anything meaningless in MachineBasicBlock
This is target dependent unfortunately -- an abstract interface can be added in MCCodeEmitter. The implementation should be similar to encodeInstruction.
This is beyond the scope of the patch, so perhaps add a TODO in the comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113424/new/
https://reviews.llvm.org/D113424
More information about the llvm-commits
mailing list