[Mlir-commits] [mlir] [mlir][LLVMIR] Add operand bundle support for llvm.intr.assume (PR #112143)

Tobias Gysi llvmlistbot at llvm.org
Mon Oct 14 01:26:22 PDT 2024


================
@@ -848,14 +849,46 @@ llvm::CallInst *mlir::LLVM::detail::createIntrinsicCall(
     llvm::IRBuilderBase &builder, ModuleTranslation &moduleTranslation,
     Operation *intrOp, llvm::Intrinsic::ID intrinsic, unsigned numResults,
     ArrayRef<unsigned> overloadedResults, ArrayRef<unsigned> overloadedOperands,
-    ArrayRef<unsigned> immArgPositions,
-    ArrayRef<StringLiteral> immArgAttrNames) {
+    ArrayRef<unsigned> immArgPositions, ArrayRef<StringLiteral> immArgAttrNames,
+    StringLiteral opBundleSizesAttrName, StringLiteral opBundleTagsAttrName) {
   assert(immArgPositions.size() == immArgAttrNames.size() &&
          "LLVM `immArgPositions` and MLIR `immArgAttrNames` should have equal "
          "length");
 
+  SmallVector<llvm::OperandBundleDef> opBundles;
+  size_t numOpBundleOperands = 0;
+  if (!opBundleSizesAttrName.empty()) {
+    auto opBundleSizesAttr =
+        llvm::cast<DenseI32ArrayAttr>(intrOp->getAttr(opBundleSizesAttrName));
----------------
gysit wrote:

```suggestion
        cast<DenseI32ArrayAttr>(intrOp->getAttr(opBundleSizesAttrName));
```
here and below

https://github.com/llvm/llvm-project/pull/112143


More information about the Mlir-commits mailing list