summaryrefslogtreecommitdiffstats
path: root/polly/include
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2019-06-12 22:40:08 +0000
committerMichael Kruse <llvm@meinersbur.de>2019-06-12 22:40:08 +0000
commitbb824c61a904a095292f1b6e56cc9835d6036afd (patch)
treeab52b5aee7481b9d3f30b8d32cee06add2e36467 /polly/include
parent5584ab89a88fb30a1a820e997af7825865650416 (diff)
downloadbcm5719-llvm-bb824c61a904a095292f1b6e56cc9835d6036afd.tar.gz
bcm5719-llvm-bb824c61a904a095292f1b6e56cc9835d6036afd.zip
[ScopBuilder] Move getNonHoistableCtx to ScopBuilder. NFC.
This review is based on review: https://reviews.llvm.org/D62925 . It is part of moving hoistInvariantLoads function and all functions referenced only by hoistInvariantLoads to ScopBuilder. Moved getNonHoistableCtx and functions listed below to ScopBuilder: isRequiredInvariantLoad hasNonHoistableBasePtrInScop isAccessRangeTooComplex These functions were referenced only by getNonHoistableCtx. MaxDimensionsInAccessRange and MaxDisjunctsInDomain constant is marked as extern and it is added to polly namespace. It is used by Scop and ScopBuilder classes. MaxDimensionsInAccessRange constant moved to ScopBuilder. It is not used outside ScopBuilder. Patch by Dominik Adamski <adamski.dominik@gmail.com> Differential Revision: https://reviews.llvm.org/D63066 llvm-svn: 363214
Diffstat (limited to 'polly/include')
-rw-r--r--polly/include/polly/ScopBuilder.h17
-rw-r--r--polly/include/polly/ScopInfo.h22
2 files changed, 22 insertions, 17 deletions
diff --git a/polly/include/polly/ScopBuilder.h b/polly/include/polly/ScopBuilder.h
index 7de59feb676..6d651e235dc 100644
--- a/polly/include/polly/ScopBuilder.h
+++ b/polly/include/polly/ScopBuilder.h
@@ -394,6 +394,23 @@ class ScopBuilder {
/// Required inv. loads: LB[0], LB[1], (V, if it may alias with A or LB)
void hoistInvariantLoads();
+ /// Return true if and only if @p LI is a required invariant load.
+ bool isRequiredInvariantLoad(LoadInst *LI) const {
+ return scop->getRequiredInvariantLoads().count(LI);
+ }
+
+ /// Check if the base ptr of @p MA is in the SCoP but not hoistable.
+ bool hasNonHoistableBasePtrInScop(MemoryAccess *MA, isl::union_map Writes);
+
+ /// Return the context under which the access cannot be hoisted.
+ ///
+ /// @param Access The access to check.
+ /// @param Writes The set of all memory writes in the scop.
+ ///
+ /// @return Return the context under which the access cannot be hoisted or a
+ /// nullptr if it cannot be hoisted at all.
+ isl::set getNonHoistableCtx(MemoryAccess *Access, isl::union_map Writes);
+
/// Collect loads which might form a reduction chain with @p StoreMA.
///
/// Check if the stored value for @p StoreMA is a binary operator with one or
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index 3045b7a4f10..b5dfd296c2f 100644
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -49,6 +49,11 @@ class MemoryAccess;
extern bool UseInstructionNames;
+// The maximal number of basic sets we allow during domain construction to
+// be created. More complex scops will result in very high compile time and
+// are also unlikely to result in good code
+extern int const MaxDisjunctsInDomain;
+
/// Enumeration of assumptions Polly can take.
enum AssumptionKind {
ALIASING,
@@ -2028,9 +2033,6 @@ private:
/// Return the access for the base ptr of @p MA if any.
MemoryAccess *lookupBasePtrAccess(MemoryAccess *MA);
- /// Check if the base ptr of @p MA is in the SCoP but not hoistable.
- bool hasNonHoistableBasePtrInScop(MemoryAccess *MA, isl::union_map Writes);
-
/// Check if @p MA can always be hoisted without execution context.
bool canAlwaysBeHoisted(MemoryAccess *MA, bool StmtInvalidCtxIsEmpty,
bool MAInvalidCtxIsEmpty,
@@ -2635,15 +2637,6 @@ public:
return MinMaxAliasGroups;
}
- /// Return the context under which the access cannot be hoisted.
- ///
- /// @param Access The access to check.
- /// @param Writes The set of all memory writes in the scop.
- ///
- /// @return Return the context under which the access cannot be hoisted or a
- /// nullptr if it cannot be hoisted at all.
- isl::set getNonHoistableCtx(MemoryAccess *Access, isl::union_map Writes);
-
/// Get an isl string representing the context.
std::string getContextStr() const;
@@ -2716,11 +2709,6 @@ public:
/// Add @p LI to the set of required invariant loads.
void addRequiredInvariantLoad(LoadInst *LI) { DC.RequiredILS.insert(LI); }
- /// Return true if and only if @p LI is a required invariant load.
- bool isRequiredInvariantLoad(LoadInst *LI) const {
- return getRequiredInvariantLoads().count(LI);
- }
-
/// Return the set of boxed (thus overapproximated) loops.
const BoxedLoopsSetTy &getBoxedLoops() const { return DC.BoxedLoopsSet; }
OpenPOWER on IntegriCloud