[PATCH] D129975: [CodeGen] Add MachineFunction::estimateSizeInBytes()

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 11:39:48 PDT 2022


efriedma added a comment.

The ARM version EstimateFunctionSizeInBytes in the context of frame lowering needs to ensure that it interacts correctly with later passes that might cause the function to grow, in particular ARMConstantIslandPass.  The inclusion of constant pools and jump tables is intended to account for that.  On targets which don't have an equivalent pass, you probably don't want to measure them.  I guess CSKY in particular does embed constant pools... but it doesn't look like it embeds jump tables?

Anyway, it isn't obvious to me that you can actually come up with an estimate that actually makes sense in a target-independent context, so I'm not sure this is worth doing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129975



More information about the llvm-commits mailing list