[PATCH] D73339: [RISCV] Compress instructions based on function features

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 27 09:19:02 PST 2020


lenary added a comment.

I have one query at the moment:



================
Comment at: llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp:160
 
+void RISCVAsmPrinter::SetupMachineFunction(MachineFunction &MF) {
+  // Set the current MCSubtargetInfo to a copy which has the correct
----------------
Most backends seem to override `AsmPrinter::runOnFunction` entirely (the default implementation calls `SetupMachineFunction`), and avoid overriding `SetupMachineFunction`. Is there a particular reason you've chosen one vs the other? I note things like the ARM backend are pulling a `SubtargetInfo` out of the MachineFunction in their `runOnFunction` implementations, but I realise we end up needing a `MCSubtargetInfo` here - I presume that's the main reason?


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

https://reviews.llvm.org/D73339





More information about the llvm-commits mailing list