This is an archive of the discontinued LLVM Phabricator instance.

[Polly][NFC][ScopBuilder] Move buildDomains and its callees to ScopBuilder.
ClosedPublic

Authored by domada on Aug 4 2019, 2:19 PM.

Details

Summary

Scope of changes:

  1. Moved buildDomains function to ScopBuilder class.
  2. Moved buildDomainsWithBranchConstraints function to ScopBuilder class.
  3. Moved propagateDomainConstraints to ScopBuilder class.
  4. Moved propagateDomainConstraintsToRegionExit to ScopBuilder class.
  5. Moved propagateInvalidStmtDomains to ScopBuilder class.
  6. Moved getPredecessorDomainConstraints function to ScopBuilder class.
  7. Moved addLoopBoundsToHeaderDomain function to ScopBuilder class.
  8. Moved getPwAff function to ScopBuilder class.
  9. Moved buildConditionSets functions to ScopBuilder class.
  10. Added updateMaxLoopDepth, notifyErrorBlock, getOrInitEmptyDomain, isDomainDefined, setDomain functions to Scop class. They are used by ScopBuilder.
  11. Moved helper functions: getRegionNodeBasicBlock, getRegionNodeSuccessor, containsErrorBlock, createNextIterationMap, collectBoundedParts, partitionSetParts, buildConditionSet to ScopBuilder.cpp file.

Diff Detail

Repository
rL LLVM

Event Timeline

domada created this revision.Aug 4 2019, 2:19 PM
Meinersbur added inline comments.Aug 5 2019, 9:58 AM
polly/include/polly/ScopBuilder.h
294–300 ↗(On Diff #213269)

[nit] unrelated noise (here and below). Possibly the result of adding and indention (e.g. by forgetting to close a { somewhere before these lines), running clang-format, then fixing it.

polly/include/polly/ScopInfo.h
2496 ↗(On Diff #213269)

[typo] dpeth

2497 ↗(On Diff #213269)

[bikeshedding] "set" might not be the right verb as it does not just overwrite the depth. How about update (or notify which you used below)?

2576 ↗(On Diff #213269)

[bikeshedding] The idiom usually is named getOr... (e.g. LLVMContext::getOrAddScopeRecordIdxEntry, Scop::getOrCreateScopArrayInfo). How about getOrInitEmptyDomain?

domada updated this revision to Diff 213476.Aug 5 2019, 3:29 PM

Applied @Meinersbur remarks.

domada marked 4 inline comments as done.Aug 5 2019, 3:30 PM
This revision is now accepted and ready to land.Aug 5 2019, 3:31 PM
domada edited the summary of this revision. (Show Details)Aug 5 2019, 3:33 PM
This revision was automatically updated to reflect the committed changes.