[LLVMdev] [PATCH][RFC] HSAIL Target

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Jul 2 05:13:05 PDT 2015


> The main problem is it isn't streamable. Everything is split into multiple
> sections in the binary. For example, instructions have their operands placed
> in a different section and the instruction encoding includes the offset into
> the other section. libHSAIL needs to construct the full output for the
> module in memory and then emit code at the end, which is not how MC expects
> binary formats to work. This particular problem we've thought might be
> fixable with lots of custom fixups.

That is not that different from other formats. We build fragments for
the entire file as we go and only output everything in the end.

The fact that an istruction

foo bar, zed

creates two fragments instead of one looks fairly minor IMHO.


> There are also issues with debug info. One of the problems is that the text
> format currently doesn't have a way of representing DWARF, and BRIG has its
> own special handling of DWARF in a separate section as well. Binary formats
> and MC aren't areas I'm particularly familiar with.

That is something that has to be fixed in the text format.

Cheers,
Rafael



More information about the llvm-dev mailing list