[PATCH] XCore target: Add TypeString meta data to IR output.

robert lytton robert at xmos.com
Thu Mar 6 01:17:34 PST 2014


  Hi Eric,

  The XCore ABI includes a type information section that communicates symbol type information to the linker.
  The linker uses this information to verify safety/correctness of things such as array bound and pointers etc.

  This type information (TypeString) is emitted into meta data for all global symbols - definitions, declarations, functions & variables.
  The TypeString carries type, qualifier, name, size & value details - as verified in xcore-stringtype.c

  Currently meta data seems the best way to get this information to the back-end and hence the linker.
  It seems the IR could encode this information as attributes for functions definitions & declaration - but global variables don't have attributes.

  The addition of emitTargetMD() is because SetTargetAttributes() only visits function definitions.
  Is there a better hook or better mechanism?

  Thank you.

  Robert

http://llvm-reviews.chandlerc.com/D2929



More information about the llvm-commits mailing list