diff options
| author | Sebastian Pop <spop@codeaurora.org> | 2012-12-18 07:46:06 +0000 |
|---|---|---|
| committer | Sebastian Pop <spop@codeaurora.org> | 2012-12-18 07:46:06 +0000 |
| commit | a00a0291155b2e9668475b0c7cb4ca4bcd28a951 (patch) | |
| tree | 5cfb8c431e2b2f1aef84f9f4bad9cd9d9ab37484 /polly/lib/CodeGen/CodeGeneration.cpp | |
| parent | bad01549b6c0c2c3a9acbca22a9c9dae3b32654a (diff) | |
| download | llvm-a00a0291155b2e9668475b0c7cb4ca4bcd28a951.zip llvm-a00a0291155b2e9668475b0c7cb4ca4bcd28a951.tar.gz llvm-a00a0291155b2e9668475b0c7cb4ca4bcd28a951.tar.bz2 | |
change interface for isStride
isStride now takes a partial schedule as input.
Patch from Tobias Grosser <tobias@grosser.es>.
llvm-svn: 170419
Diffstat (limited to 'polly/lib/CodeGen/CodeGeneration.cpp')
| -rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 064c828..60302cb 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -394,6 +394,19 @@ void ClastStmtCodeGen::codegenSubstitutions(const clast_stmt *Assignment, } } +// Takes the cloog specific domain and translates it into a map Statement -> +// PartialSchedule, where the PartialSchedule contains all the dimensions that +// have been code generated up to this point. +static __isl_give isl_map *extractPartialSchedule(ScopStmt *Statement, + isl_set *Domain) { + isl_map *Schedule = Statement->getScattering(); + int ScheduledDimensions = isl_set_dim(Domain, isl_dim_set); + int UnscheduledDimensions = isl_map_dim(Schedule, isl_dim_out) - ScheduledDimensions; + + return isl_map_project_out(Schedule, isl_dim_out, ScheduledDimensions, + UnscheduledDimensions); +} + void ClastStmtCodeGen::codegen(const clast_user_stmt *u, std::vector<Value*> *IVS , const char *iterator, isl_set *Domain) { @@ -422,7 +435,9 @@ void ClastStmtCodeGen::codegen(const clast_user_stmt *u, } } - VectorBlockGenerator::generate(Builder, *Statement, VectorMap, Domain, P); + isl_map *Schedule = extractPartialSchedule(Statement, Domain); + VectorBlockGenerator::generate(Builder, *Statement, VectorMap, Schedule, P); + isl_map_free(Schedule); } void ClastStmtCodeGen::codegen(const clast_block *b) { |
