mirror of
https://github.com/clang-retro/llvm.git
synced 2026-12-06 09:09:34 -08:00
[mlir][Tensor] Stop using getAttrs() and only copy discardable call attributes explicitly (#226412)
Preserve discardable metadata when recreating a typed direct call; its builder supplies the inherent fields. Part of #155475 Assisted-by: Codex
This commit is contained in:
1 parent
f4620e36f5
commit
75811754a2
1 file changed
+2
-1
@@ -228,7 +228,8 @@ static void rewriteScalarizableFunction(func::FuncOp func,
|
||||
rewriter.setInsertionPoint(directCall);
|
||||
func::CallOp newDirectCall = func::CallOp::create(
|
||||
rewriter, directCall.getLoc(), func, directCall.getOperands());
|
||||
newDirectCall->setAttrs(directCall->getAttrs());
|
||||
newDirectCall->setDiscardableAttrs(
|
||||
directCall->getDiscardableAttrDictionary());
|
||||
|
||||
if (!directCall.getResult(0).use_empty()) {
|
||||
Value wrappedResult = tensor::FromElementsOp::create(
|
||||
|
||||
Reference in new issue
Block a user