[PATCH] D45961: [MC] Add MCSubtargetInfo to MCAlignFragment
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 4 10:22:27 PDT 2021
MaskRay added inline comments.
================
Comment at: llvm/include/llvm/MC/MCFragment.h:314
+ /// MCSubtargetInfo - When emitting Nops some subtargets have specific
+ /// nop encodings.
----------------
"Don’t duplicate function or class name at the beginning of the comment."
from https://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments
================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:278
- OutStreamer->InitSections(false);
+ // We're at the module level. Construct MCSubtarget from the default CPU
+ // and target triple.
----------------
This can be deleted.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:284
+
+ OutStreamer->initSections(false, OutContext.getSubtargetCopy(*STI));
----------------
================
Comment at: llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp:138
C.Streamer->emitCFIEscape(Str);
- C.Streamer->emitNops(4, 1, SMLoc());
+ C.Streamer->emitNops(4, 1, SMLoc(), *STI);
C.Streamer->emitCFIEndProc();
----------------
emitNops does not have the STI argument in this patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D45961/new/
https://reviews.llvm.org/D45961
More information about the llvm-commits
mailing list