[PATCH] D66210: [RFC/WIP][RISCV] Enable the machine outliner for RISC-V

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 15:58:55 PDT 2019


luismarques added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:496
+  for (; I != E; ++I)
+    SequenceSize += getInstSizeInBytes(*I);
+
----------------
efriedma wrote:
> luismarques wrote:
> > This might be pessimistic when the instructions are compressible. Suddenly the outlined amount vs the overhead math might not quite be realistic. I think it's worth devising a test to try to explore how much of a problem that is, and if we can compensate for it by, say, tweaking the overhead numbers, or determining if the instruction is likely to be compressible, or being conservative regarding the instruction size when targeting RVC.
> Wouldn't you want getInstSizeInBytes to account for compression for other reasons, anyway?  For example, to avoid triggering branch relaxation when it isn't necessary.
@efriedma I was assuming it wouldn't be possible to make `getInstSizeInBytes` fully account for compression due to relaxations and/or compression being done by the linker, but if that is possible (or at least a good enough approximation) then that sounds like a good solution.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66210





More information about the llvm-commits mailing list