Skip to content

Commit

Permalink
Purge input relations if pruneImdtRels is set
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjseitz committed Feb 8, 2023
1 parent 30df8ff commit fa18123
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/synthesiser/Synthesiser.cpp
Original file line number Diff line number Diff line change
@@ -486,9 +486,8 @@ void Synthesiser::emitCode(std::ostream& out, const Statement& stmt) {
PRINT_BEGIN_COMMENT(out);

auto Relation = synthesiser.lookup(clear.getRelation());
bool isIntermediate = !contains(synthesiser.loadRelations, Relation->getName()) &&
!contains(synthesiser.storeRelations, Relation->getName()) &&
!Relation->isTemp();
bool isIntermediate =
!contains(synthesiser.storeRelations, Relation->getName()) && !Relation->isTemp();

if (isIntermediate) {
out << "if (pruneImdtRels) ";
@@ -2618,6 +2617,7 @@ void Synthesiser::generateCode(GenDb& db, const std::string& id, bool& withShare
db.usesDatastructure(mainClass, typeName);
}

std::set<std::string> loadRelations;
std::set<const IO*> loadIOs;
std::set<const IO*> storeIOs;

3 changes: 0 additions & 3 deletions src/synthesiser/Synthesiser.h
Original file line number Diff line number Diff line change
@@ -91,9 +91,6 @@ class Synthesiser {
/** signatures of the user-defined functors */
std::map<std::string, std::pair<std::vector<std::string>, std::string>> functor_signatures;

/** Input relations */
std::set<std::string> loadRelations;

/** Output relations */
std::set<std::string> storeRelations;

0 comments on commit fa18123

Please sign in to comment.