| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Reapply "[mlir] Link libraries that aren't included in libMLIR to libMLIR" (#123910) Use mlir_target_link_libraries() to link dependencies of libraries that are not included in libMLIR, to ensure that they link to the dylib when they are used in Flang. Otherwise, they implicitly pull in all their static dependencies, effectively causing Flang binaries to simultaneously link to the dylib and to static libraries, which is never a good idea. I have only covered the libraries that are used by Flang. If you wish, I can extend this approach to all non-libMLIR libraries in MLIR, making MLIR itself also link to the dylib consistently. [v3 with more -DBUILD_SHARED_LIBS=ON fixes] | 1 年前 | |
[MLIR] Replace getVoidPtrType with getPtrType in ConvertToLLVMPattern (#145657) ConversionPattern::getVoidPtrType looks a little confusion since the opaque pointer migration is already done. Also we cannot specify address space in this method. Maybe we can mark them as deprecated and add new method getPtrType(), as this PR did : ) | 1 年前 | |
[mlir][LLVM] Improve lowering of llvm.byval function arguments (#100028) When a function argument is annotated with the llvm.byval attribute, [LLVM expects](https://llvm.org/docs/LangRef.html#parameter-attributes) the function argument type to be an llvm.ptr. For example: func.func (%args0 : llvm.ptr {llvm.byval = !llvm.struct<(i32)>} { ... } Unfortunately, this makes the type conversion context-dependent, which is something that the type conversion infrastructure (i.e., LLVMTypeConverter in this particular case) doesn't support. For example, we may want to convert MyType to llvm.struct<(i32)> in general, but to an llvm.ptr type only when it's a function argument passed by value. To fix this problem, this PR changes the FuncToLLVM conversion logic to generate an llvm.ptr when the function argument has a llvm.byval attribute. An llvm.load is inserted into the function to retrieve the value expected by the argument users. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 |