[RISCV] Added isCompressibleInst() to estimate size in getInstSizeInBytes()
authorAna Pazos <apazos@quicinc.com>
Mon, 16 Dec 2019 23:09:48 +0000 (15:09 -0800)
committerAna Pazos <apazos@quicinc.com>
Mon, 16 Dec 2019 23:15:10 +0000 (15:15 -0800)
commitd7af86bdd0bdc9509fd7fdc3ae34bb0f4b9d269f
tree9115b25f83130ab109bbf0cd67747a557206fbd6
parent002adabb3a251a81ef304353eefb1bf96ec388f6
[RISCV] Added isCompressibleInst() to estimate size in getInstSizeInBytes()

Summary:
Modified compression emitter tablegen backend to emit isCompressibleInst()
check which in turn is used by getInstSizeInBytes() to better estimate
instruction size. Note the generation of compressed instructions in RISC-V
happens late in the assembler therefore instruction size estimate might be off
if computed before.

Reviewers: lenary, asb, luismarques, lewis-revill

Reviewed By: asb

Subscribers: sameer.abuasal, lewis-revill, hiraditya, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68290
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/utils/TableGen/RISCVCompressInstEmitter.cpp