This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Make TempScopInfo a RegionPass
ClosedPublic

Authored by Meinersbur on Aug 13 2015, 10:00 AM.

Details

Summary

This modifies the order in which Polly passes are executed.

Assuming a function has two scops (A and B), the order before was:

FunctionPassManager:

ScopDetection
IndependentBlocks
TempScopInfo for A and B
RegionPassManager:
  ScopInfo for A
  DependenceInfo for A
  IslScheduleOptimizer for A
  IslAstInfo for A
  CodeGeneration for A
  ScopInfo for B
  DependenceInfo for B
  IslScheduleOptimizer for B
  IslAstInfo for B
  CodeGeneration for B

After this patch:

FunctionPassManager:

ScopDetection
IndependentBlocks
RegionPassManager:
  TempScopInfo for A
  ScopInfo for A
  DependenceInfo for A
  IslScheduleOptimizer for A
  IslAstInfo for A
  CodeGeneration for A
  TempScopInfo for B
  ScopInfo for B
  DependenceInfo for B
  IslScheduleOptimizer for B
  IslAstInfo for B
  CodeGeneration for B

TempScopInfo for B might store information and references to the IR that CodeGeneration for A might modify. Changing the order ensures that the IR is not modified from the analysis of a region until code generation.

This is a preparation for allowing PHI nodes in exit blocks which are entries for different regions. CodeGeneration would "steal" each other's PHI nodes.

Diff Detail

Event Timeline

Meinersbur retitled this revision from to [Polly] Make TempScopInfo a RegionPass.
Meinersbur updated this object.
Meinersbur added reviewers: grosser, jdoerfert.
Meinersbur added a project: Restricted Project.
Meinersbur added subscribers: pollydev, llvm-commits.

The planned removal/merging of TempScopInfo will effectively do the same.

grosser edited edge metadata.Aug 13 2015, 10:03 AM

LGTM, if this passes LNT.

Tobias

It does ; can you accept it if it's OK? Otherwise Arcanist refuses.

grosser accepted this revision.Aug 13 2015, 12:16 PM
grosser edited edge metadata.
This revision is now accepted and ready to land.Aug 13 2015, 12:16 PM
This revision was automatically updated to reflect the committed changes.