summaryrefslogtreecommitdiff
path: root/polly/include
diff options
context:
space:
mode:
authorMichael Kruse <llvm-project@meinersbur.de>2021-10-14 14:06:20 -0500
committerMichael Kruse <llvm-project@meinersbur.de>2021-10-14 14:12:06 -0500
commit19db33c06e7e7b5991f8f4b22d3bd7651b1f854d (patch)
tree490980a6d8c81e3118441510e471ea3aeac44820 /polly/include
parenta5e52ce3f2aaa348064c08c13c9bdf3936d75a28 (diff)
downloadllvm-19db33c06e7e7b5991f8f4b22d3bd7651b1f854d.tar.gz
[Polly] Remove support for code generated by gfortran+DragonEgg.
DragonEgg is not maintained anymore, hence there is no need for this functionality. Fixes llvm.org/PR52173
Diffstat (limited to 'polly/include')
-rw-r--r--polly/include/polly/CodeGen/IslNodeBuilder.h7
-rw-r--r--polly/include/polly/LinkAllPasses.h3
-rw-r--r--polly/include/polly/RewriteByReferenceParameters.h38
-rw-r--r--polly/include/polly/ScopBuilder.h62
-rw-r--r--polly/include/polly/ScopInfo.h29
5 files changed, 0 insertions, 139 deletions
diff --git a/polly/include/polly/CodeGen/IslNodeBuilder.h b/polly/include/polly/CodeGen/IslNodeBuilder.h
index 450d63c286e9..2dc7f019e84c 100644
--- a/polly/include/polly/CodeGen/IslNodeBuilder.h
+++ b/polly/include/polly/CodeGen/IslNodeBuilder.h
@@ -78,13 +78,6 @@ public:
void addParameters(__isl_take isl_set *Context);
- /// Create Values which hold the sizes of the outermost dimension of all
- /// Fortran arrays in the current scop.
- ///
- /// @returns False, if a problem occurred and a Fortran array was not
- /// materialized. True otherwise.
- bool materializeFortranArrayOutermostDimension();
-
/// Generate code that evaluates @p Condition at run-time.
///
/// This function is typically called to generate the LLVM-IR for the
diff --git a/polly/include/polly/LinkAllPasses.h b/polly/include/polly/LinkAllPasses.h
index ccda4ef650f2..4f57e60d7ca0 100644
--- a/polly/include/polly/LinkAllPasses.h
+++ b/polly/include/polly/LinkAllPasses.h
@@ -43,7 +43,6 @@ llvm::Pass *createPolyhedralInfoPass();
llvm::Pass *createScopDetectionWrapperPassPass();
llvm::Pass *createScopInfoRegionPassPass();
llvm::Pass *createScopInfoWrapperPassPass();
-llvm::Pass *createRewriteByrefParamsWrapperPass();
llvm::Pass *createIslAstInfoWrapperPassPass();
llvm::Pass *createCodeGenerationPass();
#ifdef GPU_CODEGEN
@@ -88,7 +87,6 @@ struct PollyForcePassLinking {
polly::createScopInfoRegionPassPass();
polly::createPollyCanonicalizePass();
polly::createPolyhedralInfoPass();
- polly::createRewriteByrefParamsWrapperPass();
polly::createIslAstInfoWrapperPassPass();
polly::createCodeGenerationPass();
#ifdef GPU_CODEGEN
@@ -117,7 +115,6 @@ void initializeJSONExporterPass(llvm::PassRegistry &);
void initializeJSONImporterPass(llvm::PassRegistry &);
void initializeIslAstInfoWrapperPassPass(llvm::PassRegistry &);
void initializeCodeGenerationPass(llvm::PassRegistry &);
-void initializeRewriteByrefParamsWrapperPassPass(llvm::PassRegistry &);
#ifdef GPU_CODEGEN
void initializePPCGCodeGenerationPass(llvm::PassRegistry &);
void initializeManagedMemoryRewritePassPass(llvm::PassRegistry &);
diff --git a/polly/include/polly/RewriteByReferenceParameters.h b/polly/include/polly/RewriteByReferenceParameters.h
deleted file mode 100644
index 10e5e20787b8..000000000000
--- a/polly/include/polly/RewriteByReferenceParameters.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//===- RewriteByReferenceParameters.h -------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef POLLY_REWRITEBYREFERENCEPARAMETERS_H
-#define POLLY_REWRITEBYREFERENCEPARAMETERS_H
-
-#include "polly/ScopPass.h"
-
-namespace llvm {
-class PassRegistry;
-class Pass;
-class raw_ostream;
-} // namespace llvm
-
-namespace polly {
-llvm::Pass *createRewriteByrefParamsWrapperPass();
-
-struct RewriteByrefParamsPass : llvm::PassInfoMixin<RewriteByrefParamsPass> {
- RewriteByrefParamsPass() {}
-
- llvm::PreservedAnalyses run(llvm::Function &F,
- llvm::FunctionAnalysisManager &FAM);
-};
-
-} // namespace polly
-
-namespace llvm {
-void initializeRewriteByrefParamsWrapperPassPass(llvm::PassRegistry &);
-} // namespace llvm
-
-#endif /* POLLY_REWRITEBYREFERENCEPARAMETERS_H */
diff --git a/polly/include/polly/ScopBuilder.h b/polly/include/polly/ScopBuilder.h
index 7c3a944dd5c9..dbfc3dcff122 100644
--- a/polly/include/polly/ScopBuilder.h
+++ b/polly/include/polly/ScopBuilder.h
@@ -74,65 +74,6 @@ class ScopBuilder {
/// only be simplified later on.
RecordedAssumptionsTy RecordedAssumptions;
- // Methods for pattern matching against Fortran code generated by dragonegg.
- // @{
-
- /// Try to match for the descriptor of a Fortran array whose allocation
- /// is not visible. That is, we can see the load/store into the memory, but
- /// we don't actually know where the memory is allocated. If ALLOCATE had been
- /// called on the Fortran array, then we will see the lowered malloc() call.
- /// If not, this is dubbed as an "invisible allocation".
- ///
- /// "<descriptor>" is the descriptor of the Fortran array.
- ///
- /// Pattern match for "@descriptor":
- /// 1. %mem = load double*, double** bitcast (%"struct.array1_real(kind=8)"*
- /// <descriptor> to double**), align 32
- ///
- /// 2. [%slot = getelementptr inbounds i8, i8* %mem, i64 <index>]
- /// 2 is optional because if you are writing to the 0th index, you don't
- /// need a GEP.
- ///
- /// 3.1 store/load <memtype> <val>, <memtype>* %slot
- /// 3.2 store/load <memtype> <val>, <memtype>* %mem
- ///
- /// @see polly::MemoryAccess, polly::ScopArrayInfo
- ///
- /// @note assumes -polly-canonicalize has been run.
- ///
- /// @param Inst The LoadInst/StoreInst that accesses the memory.
- ///
- /// @returns Reference to <descriptor> on success, nullptr on failure.
- Value *findFADAllocationInvisible(MemAccInst Inst);
-
- /// Try to match for the descriptor of a Fortran array whose allocation
- /// call is visible. When we have a Fortran array, we try to look for a
- /// Fortran array where we can see the lowered ALLOCATE call. ALLOCATE
- /// is materialized as a malloc(...) which we pattern match for.
- ///
- /// Pattern match for "%untypedmem":
- /// 1. %untypedmem = i8* @malloc(...)
- ///
- /// 2. %typedmem = bitcast i8* %untypedmem to <memtype>
- ///
- /// 3. [%slot = getelementptr inbounds i8, i8* %typedmem, i64 <index>]
- /// 3 is optional because if you are writing to the 0th index, you don't
- /// need a GEP.
- ///
- /// 4.1 store/load <memtype> <val>, <memtype>* %slot, align 8
- /// 4.2 store/load <memtype> <val>, <memtype>* %mem, align 8
- ///
- /// @see polly::MemoryAccess, polly::ScopArrayInfo
- ///
- /// @note assumes -polly-canonicalize has been run.
- ///
- /// @param Inst The LoadInst/StoreInst that accesses the memory.
- ///
- /// @returns Reference to %untypedmem on success, nullptr on failure.
- Value *findFADAllocationVisible(MemAccInst Inst);
-
- // @}
-
// Build the SCoP for Region @p R.
void buildScop(Region &R, AssumptionCache &AC);
@@ -417,9 +358,6 @@ class ScopBuilder {
/// all memory accesses have been modeled and canonicalized.
void assumeNoOutOfBounds();
- /// Mark arrays that have memory accesses with FortranArrayDescriptor.
- void markFortranArrays();
-
/// Build the alias checks for this SCoP.
bool buildAliasChecks();
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index 7f07af3d8d16..5eff6eb3e8d2 100644
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -264,16 +264,6 @@ public:
/// with old sizes
bool updateSizes(ArrayRef<const SCEV *> Sizes, bool CheckConsistency = true);
- /// Make the ScopArrayInfo model a Fortran array.
- /// It receives the Fortran array descriptor and stores this.
- /// It also adds a piecewise expression for the outermost dimension
- /// since this information is available for Fortran arrays at runtime.
- void applyAndSetFAD(Value *FAD);
-
- /// Get the FortranArrayDescriptor corresponding to this array if it exists,
- /// nullptr otherwise.
- Value *getFortranArrayDescriptor() const { return this->FAD; }
-
/// Set the base pointer to @p BP.
void setBasePtr(Value *BP) { BasePtr = BP; }
@@ -440,10 +430,6 @@ private:
/// The scop this SAI object belongs to.
Scop &S;
-
- /// If this array models a Fortran array, then this points
- /// to the Fortran array descriptor.
- Value *FAD = nullptr;
};
/// Represent memory accesses in statements.
@@ -636,13 +622,6 @@ private:
/// Updated access relation read from JSCOP file.
isl::map NewAccessRelation;
-
- /// Fortran arrays whose sizes are not statically known are stored in terms
- /// of a descriptor struct. This maintains a raw pointer to the memory,
- /// along with auxiliary fields with information such as dimensions.
- /// We hold a reference to the descriptor corresponding to a MemoryAccess
- /// into a Fortran array. FAD for "Fortran Array Descriptor"
- AssertingVH<Value> FAD;
// @}
isl::basic_map createBasicAccessMap(ScopStmt *Statement);
@@ -935,10 +914,6 @@ public:
/// the dimension of the innermost loop containing the statement.
isl::set getStride(isl::map Schedule) const;
- /// Get the FortranArrayDescriptor corresponding to this memory access if
- /// it exists, and nullptr otherwise.
- Value *getFortranArrayDescriptor() const { return this->FAD; }
-
/// Is the stride of the access equal to a certain width? Schedule is a map
/// from the statement to a schedule where the innermost dimension is the
/// dimension of the innermost loop containing the statement.
@@ -1061,10 +1036,6 @@ public:
/// Get the reduction type of this access
ReductionType getReductionType() const { return RedType; }
- /// Set the array descriptor corresponding to the Array on which the
- /// memory access is performed.
- void setFortranArrayDescriptor(Value *FAD);
-
/// Update the original access relation.
///
/// We need to update the original access relation during scop construction,