Translate align, noalias, noundef, signext and zeroext result
attributes from llvm.func to LLVM IR.
This is needed for https://github.com/llvm/llvm-project/issues/58579
Depends on D137048
Differential D137049
[mlir][llvmir] Translate function result attributes to LLVM IR. vzakhari on Oct 30 2022, 2:08 PM. Authored by
Details Translate align, noalias, noundef, signext and zeroext result This is needed for https://github.com/llvm/llvm-project/issues/58579 Depends on D137048
Diff Detail Event Timeline
Comment Actions Hi @ftynse, there is some code duplication between verifyRegionArgAttribute and verifyRegionResultAttribute right now. I am going to get rid of it when addressing https://reviews.llvm.org/D137048#inline-1324059 in a separate commit.
Comment Actions Added LLVM::isCompatibleType() check to narrow the set of types that we can reliably diagnose in the verification code.
|
It looks like I cannot verify the argument/result type in the verification hooks. For example, there are cases where llvm.align is attached to memref<...> arguments, so it is not clear to me how to verify the value type here without converting the value type to LLVM dialect type. I suggest keeping the attribute's type (UnitAttr, IntegerAttr, etc.) verification here, but keep the value type verification inside LLVM dialect to LLVM IR translator (i.e. ModuleTranslation.cpp). @ftynse, does it sound appropriate to you?