Skip to content

Commit 777519d

Browse files
committed
Rename LowererImplC to LowererImplImperative and remove some abstract lowerForall* functions from LowererImpl
1 parent ae4990f commit 777519d

File tree

4 files changed

+91
-203
lines changed

4 files changed

+91
-203
lines changed

include/taco/lower/lowerer_impl.h

Lines changed: 0 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -69,118 +69,6 @@ class LowererImpl : public util::Uncopyable {
6969
/// Lower a forall statement.
7070
virtual ir::Stmt lowerForall(Forall forall) = 0;
7171

72-
/// Lower a forall that needs to be cloned so that one copy does not have guards
73-
/// used for vectorized and unrolled loops
74-
virtual ir::Stmt lowerForallCloned(Forall forall) = 0;
75-
76-
/// Lower a forall that iterates over all the coordinates in the forall index
77-
/// var's dimension, and locates tensor positions from the locate iterators.
78-
virtual ir::Stmt lowerForallDimension(Forall forall,
79-
std::vector<Iterator> locaters,
80-
std::vector<Iterator> inserters,
81-
std::vector<Iterator> appenders,
82-
std::set<Access> reducedAccesses,
83-
ir::Stmt recoveryStmt) = 0;
84-
85-
/// Lower a forall that iterates over all the coordinates in the forall index
86-
/// var's dimension, and locates tensor positions from the locate iterators.
87-
virtual ir::Stmt lowerForallDenseAcceleration(Forall forall,
88-
std::vector<Iterator> locaters,
89-
std::vector<Iterator> inserters,
90-
std::vector<Iterator> appenders,
91-
std::set<Access> reducedAccesses,
92-
ir::Stmt recoveryStmt) = 0;
93-
94-
95-
/// Lower a forall that iterates over the coordinates in the iterator, and
96-
/// locates tensor positions from the locate iterators.
97-
virtual ir::Stmt lowerForallCoordinate(Forall forall, Iterator iterator,
98-
std::vector<Iterator> locaters,
99-
std::vector<Iterator> inserters,
100-
std::vector<Iterator> appenders,
101-
std::set<Access> reducedAccesses,
102-
ir::Stmt recoveryStmt) = 0;
103-
104-
/// Lower a forall that iterates over the positions in the iterator, accesses
105-
/// the iterators coordinate, and locates tensor positions from the locate
106-
/// iterators.
107-
virtual ir::Stmt lowerForallPosition(Forall forall, Iterator iterator,
108-
std::vector<Iterator> locaters,
109-
std::vector<Iterator> inserters,
110-
std::vector<Iterator> appenders,
111-
std::set<Access> reducedAccesses,
112-
ir::Stmt recoveryStmt) = 0;
113-
114-
virtual ir::Stmt lowerForallFusedPosition(Forall forall, Iterator iterator,
115-
std::vector<Iterator> locaters,
116-
std::vector<Iterator> inserters,
117-
std::vector<Iterator> appenders,
118-
std::set<Access> reducedAccesses,
119-
ir::Stmt recoveryStmt) = 0;
120-
121-
/// Used in lowerForallFusedPosition to generate code to
122-
/// search for the start of the iteration of the loop (a separate kernel on GPUs)
123-
virtual ir::Stmt searchForFusedPositionStart(Forall forall, Iterator posIterator) = 0;
124-
125-
/**
126-
* Lower the merge lattice to code that iterates over the sparse iteration
127-
* space of coordinates and computes the concrete index notation statement.
128-
* The merge lattice dictates the code to iterate over the coordinates, by
129-
* successively iterating to the exhaustion of each relevant sparse iteration
130-
* space region (i.e., the regions in a venn diagram). The statement is then
131-
* computed and/or indices assembled at each point in its sparse iteration
132-
* space.
133-
*
134-
* \param lattice
135-
* A merge lattice that describes the sparse iteration space of the
136-
* concrete index notation statement.
137-
* \param coordinate
138-
* An IR expression that resolves to the variable containing the current
139-
* coordinate the merge lattice is at.
140-
* \param statement
141-
* A concrete index notation statement to compute at the points in the
142-
* sparse iteration space described by the merge lattice.
143-
*
144-
* \return
145-
* IR code to compute the forall loop.
146-
*/
147-
virtual ir::Stmt lowerMergeLattice(MergeLattice lattice, IndexVar coordinateVar,
148-
IndexStmt statement,
149-
const std::set<Access>& reducedAccesses) = 0;
150-
151-
virtual ir::Stmt resolveCoordinate(std::vector<Iterator> mergers, ir::Expr coordinate, bool emitVarDecl) = 0;
152-
153-
/**
154-
* Lower the merge point at the top of the given lattice to code that iterates
155-
* until one region of the sparse iteration space of coordinates and computes
156-
* the concrete index notation statement.
157-
*
158-
* \param pointLattice
159-
* A merge lattice whose top point describes a region of the sparse
160-
* iteration space of the concrete index notation statement.
161-
* \param coordinate
162-
* An IR expression that resolves to the variable containing the current
163-
* coordinate the merge point is at.
164-
* A concrete index notation statement to compute at the points in the
165-
* sparse iteration space region described by the merge point.
166-
*/
167-
virtual ir::Stmt lowerMergePoint(MergeLattice pointLattice,
168-
ir::Expr coordinate, IndexVar coordinateVar, IndexStmt statement,
169-
const std::set<Access>& reducedAccesses, bool resolvedCoordDeclared) = 0;
170-
171-
/// Lower a merge lattice to cases.
172-
virtual ir::Stmt lowerMergeCases(ir::Expr coordinate, IndexVar coordinateVar, IndexStmt stmt,
173-
MergeLattice lattice,
174-
const std::set<Access>& reducedAccesses) = 0;
175-
176-
/// Lower a forall loop body.
177-
virtual ir::Stmt lowerForallBody(ir::Expr coordinate, IndexStmt stmt,
178-
std::vector<Iterator> locaters,
179-
std::vector<Iterator> inserters,
180-
std::vector<Iterator> appenders,
181-
const std::set<Access>& reducedAccesses) = 0;
182-
183-
18472
/// Lower a where statement.
18573
virtual ir::Stmt lowerWhere(Where where) = 0;
18674

include/taco/lower/lowerer_impl_C.h renamed to include/taco/lower/lowerer_impl_imperative.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ class Stmt;
4949
class Expr;
5050
}
5151

52-
class LowererImplC : public LowererImpl {
52+
class LowererImplImperative : public LowererImpl {
5353
public:
54-
LowererImplC();
55-
virtual ~LowererImplC() = default;
54+
LowererImplImperative();
55+
virtual ~LowererImplImperative() = default;
5656

5757
/// Lower an index statement to an IR function.
5858
ir::Stmt lower(IndexStmt stmt, std::string name,

src/lower/lower.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "taco/ir/ir_printer.h"
1616

1717
#include "taco/lower/lowerer_impl.h"
18-
#include "taco/lower/lowerer_impl_C.h"
18+
#include "taco/lower/lowerer_impl_imperative.h"
1919
#include "taco/lower/iterator.h"
2020
#include "mode_access.h"
2121

@@ -34,7 +34,7 @@ namespace taco {
3434

3535

3636
// class Lowerer
37-
Lowerer::Lowerer() : impl(new LowererImplC()) {
37+
Lowerer::Lowerer() : impl(new LowererImplImperative()) {
3838
}
3939

4040
Lowerer::Lowerer(LowererImpl* impl) : impl(impl) {

0 commit comments

Comments
 (0)