[PATCH] D25781: AMDGPU: Emit runtime metadata as a note element in .note section

Yaxun Liu via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 12:16:29 PST 2016


yaxunl added inline comments.


================
Comment at: lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp:496
+
+void AMDGPUTargetStreamer::emitRuntimeMetadataAsNoteElement(Module &M) {
+  auto &S = getStreamer();
----------------
kzhuravl wrote:
> yaxunl wrote:
> > kzhuravl wrote:
> > > yaxunl wrote:
> > > > kzhuravl wrote:
> > > > > I think ELF streaming belongs to AMDGPUTargetELFStreamer?
> > > > Normally I should define virtual functions for streaming the runtime metadata in textual and binary form separately in AMGGPUTargetASMStreamer and AMDGPUTargetELFStreamer. However we will replace this runtime metadata format with YAML based runtime metadata format soon, so I feel not worth the efforts to implement the textual format for the current runtime metadata format. After we move to YAML based runtime metadata format, I will come back to a better solution.
> > > > 
> > > Shouldn't we define pure virtual functions in base class, only implement them in AMDGPUTargetELFStreamer subclass, and possibly define same functions in AMGGPUTargetASMStreamer subclass but leave the body empty?
> > If we do this, there will be no runtime metadata in the llc output. Then how do we test this?
> -filetype=obj will cause llc to produce elf, which will have runtime metadata. Since it is a temporary solution as you indicated before, I am fine with what is currently done. Please, also, run it by Matt or Tom.
This requests rewriting the test in a new way. Currently there is not enough time to make this change. Can we leave this to future?


https://reviews.llvm.org/D25781





More information about the llvm-commits mailing list