diff options
author | Michael Kruse <llvm@meinersbur.de> | 2018-08-10 22:33:27 +0000 |
---|---|---|
committer | Michael Kruse <llvm@meinersbur.de> | 2018-08-10 22:33:27 +0000 |
commit | 0e4e6e5e87a7829cabb9fa6fc1a6cbefe2663d56 (patch) | |
tree | 8a8dbabd9899c61bb72ca32ea933a8a8bb82dc3c /polly/lib/Exchange/JSONExporter.cpp | |
parent | 25f1f7325feac42b3bf05fd408e15b6a6be7d81c (diff) | |
download | bcm5719-llvm-0e4e6e5e87a7829cabb9fa6fc1a6cbefe2663d56.tar.gz bcm5719-llvm-0e4e6e5e87a7829cabb9fa6fc1a6cbefe2663d56.zip |
[DepInfo] Use isl++ in Dependences::isValidSchedule. NFC.
Also change StatementToIslMapTy to hold isl::map, because it is used as a
parameter.
llvm-svn: 339484
Diffstat (limited to 'polly/lib/Exchange/JSONExporter.cpp')
-rw-r--r-- | polly/lib/Exchange/JSONExporter.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp index 0a744901e2b..41975396efa 100644 --- a/polly/lib/Exchange/JSONExporter.cpp +++ b/polly/lib/Exchange/JSONExporter.cpp @@ -288,9 +288,6 @@ static bool importSchedule(Scop &S, const json::Object &JScop, // Check if key 'schedule' is present. if (!statements[Index].getAsObject()->get("schedule")) { errs() << "Statement " << Index << " has no 'schedule' key.\n"; - for (auto Element : NewSchedule) { - isl_map_free(Element.second); - } return false; } Optional<StringRef> Schedule = @@ -304,9 +301,6 @@ static bool importSchedule(Scop &S, const json::Object &JScop, if (!Map) { errs() << "The schedule was not parsed successfully (index = " << Index << ").\n"; - for (auto Element : NewSchedule) { - isl_map_free(Element.second); - } return false; } @@ -321,23 +315,21 @@ static bool importSchedule(Scop &S, const json::Object &JScop, Map = isl_map_set_dim_id(Map, isl_dim_param, i, Id); } isl_space_free(Space); - NewSchedule[&Stmt] = Map; + NewSchedule[&Stmt] = isl::manage(Map); Index++; } // Check whether the new schedule is valid or not. - if (!D.isValidSchedule(S, &NewSchedule)) { + if (!D.isValidSchedule(S, NewSchedule)) { errs() << "JScop file contains a schedule that changes the " << "dependences. Use -disable-polly-legality to continue anyways\n"; - for (auto Element : NewSchedule) - isl_map_free(Element.second); return false; } auto ScheduleMap = isl::union_map::empty(S.getParamSpace()); for (ScopStmt &Stmt : S) { if (NewSchedule.find(&Stmt) != NewSchedule.end()) - ScheduleMap = ScheduleMap.add_map(isl::manage(NewSchedule[&Stmt])); + ScheduleMap = ScheduleMap.add_map(NewSchedule[&Stmt]); else ScheduleMap = ScheduleMap.add_map(Stmt.getSchedule()); } |