[PATCH] D33942: [Polly] [WIP] Getting a SCoP statement for each instruction. NFC
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 10:30:46 PDT 2017
Meinersbur requested changes to this revision.
Meinersbur added a comment.
This revision now requires changes to proceed.
Please don't remove an overload of `getStmtFor` if it is still called somewhere. It doesn't compile otherwise. It must also pass `check-polly` so we can see there are no unintended behavioral changes.
================
Comment at: lib/Analysis/ScopInfo.cpp:2627-2628
+ InvalidDomainMap[EntryBB] = isl_set_empty(isl_set_get_space(S));
+ for (ScopStmt &Stmt : Stmts)
+ Stmt.setInvalidDomain(InvalidDomainMap[Stmt.getBasicBlock()]);
----------------
Please only iterate and setInvalidDomain only once at the end of the function, when `InvalidDomainMap` contains all latest entries.
You cannot call `getBasicBlock()` on region statements.
================
Comment at: lib/Analysis/ScopInfo.cpp:2731
- auto *InvalidDomain = Stmt->getInvalidDomain();
+ auto *InvalidDomain = InvalidDomainMap[BB];
bool IsInvalidBlock =
----------------
Note that there are also region statements, which do not have a 1-to-1 correlation between statements and a BasicBlock.
You might either normalize to a region's entry block, or use the `RegionNode`type (the `RN` variable) instead.
================
Comment at: lib/Analysis/ScopInfo.cpp:2747-2748
if (isl_set_is_empty(InvalidDomain)) {
- Stmt->setInvalidDomain(InvalidDomain);
+ for (ScopStmt &Stmt : Stmts)
+ Stmt.setInvalidDomain(InvalidDomainMap[Stmt.getBasicBlock()]);
continue;
----------------
Update `InvalidDomainMap` instead.
https://reviews.llvm.org/D33942
More information about the llvm-commits
mailing list