summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riddleriver@gmail.com>2020-12-17 12:24:45 -0800
committerRiver Riddle <riddleriver@gmail.com>2020-12-17 13:01:36 -0800
commit1b97cdf885d6455841280b8da858835e641ee941 (patch)
treeacd8503bb6e0b42cb9a06d3670742c5f958990ae /mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
parent511cfe9441955f20a8b93573fb9b62433b053550 (diff)
downloadllvm-1b97cdf885d6455841280b8da858835e641ee941.tar.gz
[mlir][IR][NFC] Move context/location parameters of builtin Type::get methods to the start of the parameter list
This better matches the rest of the infrastructure, is much simpler, and makes it easier to move these types to being declaratively specified. Differential Revision: https://reviews.llvm.org/D93432
Diffstat (limited to 'mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp')
-rw-r--r--mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp b/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
index 2410df85ad61..073673bc33f8 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
@@ -76,25 +76,25 @@ static Value allocBuffer(const LinalgPromotionOptions &options,
IntegerAttr alignment_attr;
if (alignment.hasValue())
alignment_attr =
- IntegerAttr::get(IntegerType::get(64, ctx), alignment.getValue());
+ IntegerAttr::get(IntegerType::get(ctx, 64), alignment.getValue());
if (!dynamicBuffers)
if (auto cst = size.getDefiningOp<ConstantIndexOp>())
return options.useAlloca
? std_alloca(MemRefType::get(width * cst.getValue(),
- IntegerType::get(8, ctx)),
+ IntegerType::get(ctx, 8)),
ValueRange{}, alignment_attr)
.value
: std_alloc(MemRefType::get(width * cst.getValue(),
- IntegerType::get(8, ctx)),
+ IntegerType::get(ctx, 8)),
ValueRange{}, alignment_attr)
.value;
Value mul =
folded_std_muli(folder, folded_std_constant_index(folder, width), size);
return options.useAlloca
- ? std_alloca(MemRefType::get(-1, IntegerType::get(8, ctx)), mul,
+ ? std_alloca(MemRefType::get(-1, IntegerType::get(ctx, 8)), mul,
alignment_attr)
.value
- : std_alloc(MemRefType::get(-1, IntegerType::get(8, ctx)), mul,
+ : std_alloc(MemRefType::get(-1, IntegerType::get(ctx, 8)), mul,
alignment_attr)
.value;
}