[RISCV] Eliminate the need to pass both RISCVSubtarget and MCSubtargetInfo to isCompr...
authorCraig Topper <craig.topper@sifive.com>
Wed, 18 Jan 2023 02:04:55 +0000 (18:04 -0800)
committerCraig Topper <craig.topper@sifive.com>
Wed, 18 Jan 2023 02:28:07 +0000 (18:28 -0800)
commita971ce70aa0431aacdbdc39a0913d9c83cadfc3e
tree235a26c36098a1ddabaaa15b6fecda8369d7ff79
parentf900742746734953e8823319d5c8c40d857c10ea
[RISCV] Eliminate the need to pass both RISCVSubtarget and MCSubtargetInfo to isCompressibleInst.

RISCVSubtarget should be a superclass of MCSubtargetInfo so should
have all the same information. Now we pass RISCVSubtarget by
reference and name it STI.

Confusingly, we seem to have been using an MCSubtargetInfo from
the TargetMachine rather than the one associated with the function
we are operating. I'm going to assume that was a mistake and not
intentional.

Reviewed By: kito-cheng

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