[PATCH] D101889: [RISCV][NFC] Don't need to create a new STI in RISCVAsmPrinter.
Zakk Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 9 18:49:29 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG446ed6394bd3: [RISCV][NFC] Don't need to create a new STI in RISCVAsmPrinter. (authored by khchen).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101889/new/
https://reviews.llvm.org/D101889
Files:
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
Index: llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+++ llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
@@ -193,16 +193,7 @@
void RISCVAsmPrinter::emitAttributes() {
RISCVTargetStreamer &RTS =
static_cast<RISCVTargetStreamer &>(*OutStreamer->getTargetStreamer());
-
- const Triple &TT = TM.getTargetTriple();
- StringRef CPU = TM.getTargetCPU();
- StringRef FS = TM.getTargetFeatureString();
- const RISCVTargetMachine &RTM = static_cast<const RISCVTargetMachine &>(TM);
- /* TuneCPU doesn't impact emission of ELF attributes, ELF attributes only
- care about arch related features, so we can set TuneCPU as CPU. */
- const RISCVSubtarget STI(TT, CPU, /*TuneCPU=*/CPU, FS, /*ABIName=*/"", RTM);
-
- RTS.emitTargetAttributes(STI);
+ RTS.emitTargetAttributes(*STI);
}
// Force static initialization.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101889.343951.patch
Type: text/x-patch
Size: 931 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210510/1af70a36/attachment.bin>
More information about the llvm-commits
mailing list