[LLVMdev] subclassing MCELFStreamer

Mario Guerra mariog at codeaurora.org
Thu Dec 6 08:08:00 PST 2012

Hi Jim, Daniel, 

The last time the topic of subclassing MCELFStreamer came up, you both were
helpful in identifying ways to handle the use case without requiring
subclassing. Can you please take a look at the context below and let me know
if you have any suggestions? 

For reference, this was posted to the list yesterday under the subject
"sub-classing MCObjectStreamer?":

> Okay, after more careful scrutiny of the code I see that MCObjectStreamer
> intended to be very generic and it would actually be MCELFStreamer that I
> need to subclass. I see from a search through the dev list that this was
> previously and discouraged, so I'll provide more context.
> We are working on integrated and stand-alone assemblers for a VLIW target
> (Hexagon) and need to apply, among other things, instruction ordering
rules on a
> per-packet basis.  We could handle this in the lowering phase, but the
> assembly parser goes straight to MC and bypasses the lowering pass
> This means we need to be able to work with packets in the streamer.
> We could easily address this by subclassing the streamer, but this seems
to be
> discouraged as far as I can tell. Can we subclass MCELFStreamer to suit
> needs, or are there other ways to handle this case?

- --
Mario Guerra
mariog at codeaurora.org
Qualcomm Innovation Center Inc is a member of Code Aurora Forum, hosted by
The Linux Foundation

More information about the llvm-dev mailing list