This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX][NFC] Simplify printing initialization of aggregates
ClosedPublic

Authored by ikudrin on Jul 14 2022, 6:58 AM.

Details

Summary

This simplifies NVPTXAsmPrinter::AggBuffer and its usage. It is also a preparation for D127504.

Diff Detail

Event Timeline

ikudrin created this revision.Jul 14 2022, 6:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2022, 6:58 AM
ikudrin requested review of this revision.Jul 14 2022, 6:58 AM
tra accepted this revision.Jul 14 2022, 1:06 PM
tra added inline comments.
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h
139–144

Nit: printAsBytes/ printAsWords or just printBytes/printWords.

This revision is now accepted and ready to land.Jul 14 2022, 1:06 PM
ikudrin updated this revision to Diff 445013.Jul 15 2022, 9:26 AM
ikudrin marked an inline comment as done.

Thanks!

  • Rename printInBytes() -> printBytes(), printInWords() -> printWords()`
  • Remove an raw_ostream argument in the constructor of AggBuffer; pass the stream directly to printBytes()/printWords()
  • Extract printSymbol() in this patch to further simplify D127504
  • isNonGenericPointer -> isGenericPointer
This revision was landed with ongoing or failed builds.Jul 18 2022, 4:09 AM
This revision was automatically updated to reflect the committed changes.