This is an archive of the discontinued LLVM Phabricator instance.

[OpenMPIRBuilder] Various changes required for tileLoops.
ClosedPublic

Authored by Meinersbur on Dec 10 2020, 10:43 PM.

Details

Summary

Extract some changes not directly related to tileLoops out of D92974:

  • Refactor createLoopSkeleton out of createCanonicalLoop.
  • Introduce ComputeIP parameter to the createCanonicalLoop overload inserts instructions to compute the trip count. Specifying the location is necessary to make these instructions appear before the outermost loop of a loop nest that is tiled.
  • Introduce Name parameter to createCanonicalLoop. This can help better understanding the origin of values of basic blocks with many loops. The default value is "loop" instead of "for" which could be confused with the "for directive" (aka worksharing-loop) and does not apply to Fortran.
  • Remove CanonicalLoopInfo::eraseFromParent which is currently unused and untested and was added in anticipation to be used by tileLoops. eraseFromParent has shown to be insufficient when more than a single loop is involved and is replaced by removeUnusedBlocksFromParent in D92974.

Diff Detail

Event Timeline

Meinersbur created this revision.Dec 10 2020, 10:43 PM
Meinersbur requested review of this revision.Dec 10 2020, 10:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2020, 10:43 PM
Herald added a subscriber: sstefan1. · View Herald Transcript
SouraVX accepted this revision.Dec 11 2020, 1:02 AM

LGTM Thank You @Meinersbur for taking out time :).

This revision is now accepted and ready to land.Dec 11 2020, 1:02 AM
This revision was landed with ongoing or failed builds.Dec 11 2020, 9:37 AM
This revision was automatically updated to reflect the committed changes.