[PATCH] D47706: Add a factory method to ConstantDataArray that allows to pass in the data as StringRef

Adrian Kuegel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 5 00:36:14 PDT 2018


akuegel added a comment.

We want to use it for XLA, simplifying the ConvertLiteralToIrConstant method:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc#L374
Essentially we already have a buffer that we want to store as-is, and we can compute the type we want to store based on the XLA PrimitiveType. Then we could get rid of the switch, and it would make our code easier.


Repository:
  rL LLVM

https://reviews.llvm.org/D47706





More information about the llvm-commits mailing list