[RISCV] Make it explicit that attributes use the MCSubtargetInfo from TargetMachine...
authorCraig Topper <craig.topper@sifive.com>
Wed, 18 Jan 2023 19:31:29 +0000 (11:31 -0800)
committerCraig Topper <craig.topper@sifive.com>
Wed, 18 Jan 2023 19:31:45 +0000 (11:31 -0800)
commit9778802cb0f62d9e8588117b0a444d3d5c874250
tree12499618381f184e220dbfd35a0dab0b3001be96
parent0f4b4e8e4d8b3aafba829143e2fd4237620ea4d7
[RISCV] Make it explicit that attributes use the MCSubtargetInfo from TargetMachine. NFC

The MCSTI variable is initialized to TM.getMCSubtargetInfo(), but is
re-assigned in every call to runOnMachineFunction. emitAttributes is
called before any call to runOnMachineFunction, but it's not
immediately obvious.

This patch removes the MCSTI variable, and instead queries
TM.getMCSubtargetInfo() at the time emitAttributes is called.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D142037
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp