summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/Vectorize.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-06-04 19:18:23 -0700
committerMehdi Amini <joker.eph@gmail.com>2019-06-09 16:17:59 -0700
commitf1b848e4701a4cd3fa781c259e3728faff1c31df (patch)
tree5587429894d04d9e78eb0e91b76aea3003c94bd1 /mlir/lib/Transforms/Vectorize.cpp
parentf59f64e838c82399f7b31949e8de75547223f42b (diff)
downloadbcm5719-llvm-f1b848e4701a4cd3fa781c259e3728faff1c31df.tar.gz
bcm5719-llvm-f1b848e4701a4cd3fa781c259e3728faff1c31df.zip
NFC: Rename FuncBuilder to OpBuilder and refactor to take a top level region instead of a function.
PiperOrigin-RevId: 251563898
Diffstat (limited to 'mlir/lib/Transforms/Vectorize.cpp')
-rw-r--r--mlir/lib/Transforms/Vectorize.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/mlir/lib/Transforms/Vectorize.cpp b/mlir/lib/Transforms/Vectorize.cpp
index ddaf112dece..a96713be547 100644
--- a/mlir/lib/Transforms/Vectorize.cpp
+++ b/mlir/lib/Transforms/Vectorize.cpp
@@ -805,7 +805,7 @@ static LogicalResult vectorizeRootOrTerminal(Value *iv,
return LogicalResult::Failure;
LLVM_DEBUG(dbgs() << "\n[early-vect]+++++ permutationMap: ");
LLVM_DEBUG(permutationMap.print(dbgs()));
- FuncBuilder b(opInst);
+ OpBuilder b(opInst);
auto transfer = b.create<VectorTransferReadOp>(
opInst->getLoc(), vectorType, memoryOp.getMemRef(),
map(makePtrDynCaster<Value>(), memoryOp.getIndices()), permutationMap);
@@ -920,7 +920,7 @@ static Value *vectorizeConstant(Operation *op, ConstantOp constant, Type type) {
!VectorType::isValidElementType(constant.getType())) {
return nullptr;
}
- FuncBuilder b(op);
+ OpBuilder b(op);
Location loc = op->getLoc();
auto vectorType = type.cast<VectorType>();
auto attr = SplatElementsAttr::get(vectorType, constant.getValue());
@@ -1015,7 +1015,7 @@ static Operation *vectorizeOneOperation(Operation *opInst,
auto *value = store.getValueToStore();
auto *vectorValue = vectorizeOperand(value, opInst, state);
auto indices = map(makePtrDynCaster<Value>(), store.getIndices());
- FuncBuilder b(opInst);
+ OpBuilder b(opInst);
auto permutationMap =
makePermutationMap(opInst, state->strategy->loopToVectorDim);
if (!permutationMap)
@@ -1054,7 +1054,7 @@ static Operation *vectorizeOneOperation(Operation *opInst,
// name that works both in scalar mode and vector mode.
// TODO(ntv): Is it worth considering an Operation.clone operation which
// changes the type so we can promote an Operation with less boilerplate?
- FuncBuilder b(opInst);
+ OpBuilder b(opInst);
OperationState newOp(b.getContext(), opInst->getLoc(),
opInst->getName().getStringRef(), vectorOperands,
vectorTypes, opInst->getAttrs(), /*successors=*/{},
@@ -1136,7 +1136,7 @@ static LogicalResult vectorizeRootMatch(NestedMatch m,
/// maintains a clone for handling failure and restores the proper state via
/// RAII.
auto *loopInst = loop.getOperation();
- FuncBuilder builder(loopInst);
+ OpBuilder builder(loopInst);
auto clonedLoop = cast<AffineForOp>(builder.clone(*loopInst));
struct Guard {
LogicalResult failure() {
OpenPOWER on IntegriCloud