This is an archive of the discontinued LLVM Phabricator instance.

Resurrect RegisterAsmStreamer
AbandonedPublic

Authored by arsenm on Aug 6 2015, 3:44 PM.

Details

Reviewers
rafael
Summary

HSAIL needs to override this to avoid emission of any of the directives the standard MCAsmStreamer tries to emit, most notably anything indicating the start of a section.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 31484.Aug 6 2015, 3:44 PM
arsenm retitled this revision from to Resurrect RegisterAsmStreamer.
arsenm updated this object.
arsenm added a reviewer: rafael.
arsenm added a subscriber: llvm-commits.
arsenm updated this revision to Diff 31486.Aug 6 2015, 3:50 PM

Rebase to remove unrelated context from diff

rafael edited edge metadata.Aug 7 2015, 12:09 PM
rafael added a subscriber: rafael.

To be clear, the idea is to avoid *creating* the sections, no avoiding
printing them, correct?

Ins't all that you need to do is overload (or add an if to) InitSections?

For what it is worth, WebAssembly seems to manage to just use nullptr:

TextSection = nullptr;
  DataSection = nullptr;
  BSSSection = nullptr;
  ReadOnlySection = nullptr;
arsenm added a comment.Aug 7 2015, 2:15 PM

To be clear, the idea is to avoid *creating* the sections, no avoiding
printing them, correct?

Yes, although the specific problem is they are printed. We don't have meaningful sections in the text format.

Ins't all that you need to do is overload (or add an if to) InitSections?

Probably, but that would still require a new custom MCAsmStreamer subclass. Essentially all we want out of the MCStreamer is what MCBasicAsmStreamer has in it. Essentially anything other than printing instructions and labels are going to be incorrect.

For what it is worth, WebAssembly seems to manage to just use nullptr:

TextSection = nullptr;
  DataSection = nullptr;
  BSSSection = nullptr;
  ReadOnlySection = nullptr;

This was one of the first things I tried and it doesn't work. WebAssembly does current print .text / .data directives.

arsenm abandoned this revision.Oct 28 2016, 1:11 PM