[PATCH] D77072: [mlir] LLVMFuncOp: provide a capability to pass attributes through to LLVM IR

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 12:30:16 PDT 2020


mehdi_amini added inline comments.


================
Comment at: mlir/docs/Dialects/LLVM.md:107
+attribute.
+
 ### LLVM IR operations
----------------
nicolasvasilache wrote:
> mehdi_amini wrote:
> > That seems a bit like a hack to me: when importing from LLVM are we gonna encode attributes this way? Are we gonna honor them?
> > We're getting into the "json of compiler" here.
> > 
> Isn't the LLVM `string = string` attribute the issue here?
> Would an alternative require giving more semantics than LLVM has?
> 
> In other words, until/unless LLVM force more semantics on those attributes, isn't it a raising problem to import from LLVM and guesstimate types? 
LLVM has string attributes only for target specific I believe, otherwise there are rules for "IR-level" attributes: https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/IR/Attributes.td 
(I am not sure I totally understood what you meant though, so my answer may be off here)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77072/new/

https://reviews.llvm.org/D77072





More information about the llvm-commits mailing list