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

Konstantin Zhuravlyov via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 11:59:52 PST 2016


kzhuravl added inline comments.


================
Comment at: lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp:496
+
+void AMDGPUTargetStreamer::emitRuntimeMetadataAsNoteElement(Module &M) {
+  auto &S = getStreamer();
----------------
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.


https://reviews.llvm.org/D25781





More information about the llvm-commits mailing list