summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Analysis/LoopAnalysis.cpp
diff options
context:
space:
mode:
authorUday Bondhugula <bondhugula@google.com>2019-02-22 16:51:08 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 16:39:32 -0700
commitdfe07b7bf6077040cbb2b4392cbd81dc443570b2 (patch)
tree42a76ed1a4f1007a0725c0290a0a17d5b48655d3 /mlir/lib/Analysis/LoopAnalysis.cpp
parentc81b16e27979f319e6f7969ac9ed220bc216c1e0 (diff)
downloadbcm5719-llvm-dfe07b7bf6077040cbb2b4392cbd81dc443570b2.tar.gz
bcm5719-llvm-dfe07b7bf6077040cbb2b4392cbd81dc443570b2.zip
Refactor AffineExprFlattener and move FlatAffineConstraints out of IR into
Analysis - NFC - refactor AffineExprFlattener (-> SimpleAffineExprFlattener) so that it doesn't depend on FlatAffineConstraints, and so that FlatAffineConstraints could be moved out of IR/; the simplification that the IR needs for AffineExpr's doesn't depend on FlatAffineConstraints - have AffineExprFlattener derive from SimpleAffineExprFlattener to use for all Analysis/Transforms purposes; override addLocalFloorDivId in the derived class - turn addAffineForOpDomain into a method on FlatAffineConstraints - turn AffineForOp::getAsValueMap into an AffineValueMap ctor PiperOrigin-RevId: 235283610
Diffstat (limited to 'mlir/lib/Analysis/LoopAnalysis.cpp')
-rw-r--r--mlir/lib/Analysis/LoopAnalysis.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/mlir/lib/Analysis/LoopAnalysis.cpp b/mlir/lib/Analysis/LoopAnalysis.cpp
index 545735fd6fd..c0deb805bdf 100644
--- a/mlir/lib/Analysis/LoopAnalysis.cpp
+++ b/mlir/lib/Analysis/LoopAnalysis.cpp
@@ -23,9 +23,9 @@
#include "mlir/AffineOps/AffineOps.h"
#include "mlir/Analysis/AffineAnalysis.h"
+#include "mlir/Analysis/AffineStructures.h"
#include "mlir/Analysis/NestedMatcher.h"
#include "mlir/Analysis/VectorAnalysis.h"
-#include "mlir/IR/AffineStructures.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Instruction.h"
@@ -147,8 +147,7 @@ bool mlir::isAccessInvariant(const Value &iv, const Value &index) {
auto composeOp = affineApplyOps[0]->cast<AffineApplyOp>();
// We need yet another level of indirection because the `dim` index of the
// access may not correspond to the `dim` index of composeOp.
- return !composeOp->getAsAffineValueMap().isFunctionOf(
- 0, const_cast<Value *>(&iv));
+ return !(AffineValueMap(composeOp).isFunctionOf(0, const_cast<Value *>(&iv)));
}
llvm::DenseSet<const Value *>
OpenPOWER on IntegriCloud