This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Make CodeGeneration handle PHI nodes in exit block
AbandonedPublic

Authored by Meinersbur on Aug 8 2015, 11:07 AM.

Details

Reviewers
grosser
Summary

PHI nodes are moved into the region. This node has the identity of the previous exit node so the references in Scop/ScopStmt do not need to be updated.

Such PHI nodes cannot yet occur without changes upstream (ScopInfo, TempScopInfo, ScopDetection) which will follow.

Diff Detail

Event Timeline

Meinersbur updated this revision to Diff 31586.Aug 8 2015, 11:07 AM
Meinersbur retitled this revision from to [Polly] Make CodeGeneration handle PHI nodes in exit block.
Meinersbur updated this object.
Meinersbur added a reviewer: grosser.
Meinersbur added a project: Restricted Project.
Meinersbur added a subscriber: pollydev.

I do not understand the commit message, could you explain it to me or make it more verbose? Additionally I somehow missed the intention.

lib/CodeGen/CodeGeneration.cpp
105

There is a new range style loop for this pattern.

122

I'm not a fan of blocks only to enforce indention.

123

space missing and ExitBB instead of BB?

129

if there are multiple regions should we call setregionfor multiple times? Isn't only the first or the last call the right/important one?

133

I do not understand this part.

135

I thought there is a predessors function or something that hides the make range?

Meinersbur updated this revision to Diff 31600.Aug 8 2015, 2:05 PM
This comment was removed by Meinersbur.
Meinersbur updated this revision to Diff 31601.Aug 8 2015, 2:26 PM

Uploaded wrong diff previously

Meinersbur updated this revision to Diff 31603.Aug 8 2015, 2:36 PM

Actually found the predecessors function

Some more comments but I still do not understand the part starting at line 131 in lib/CodeGen/CodeGeneration.cpp.

lib/CodeGen/CodeGeneration.cpp
97

typo and format of the comment.

99

What does "keeps its identity" mean?

Meinersbur updated this revision to Diff 31914.Aug 12 2015, 2:41 AM
Meinersbur marked an inline comment as done.

Add splitBlockNonPredecessors that was once in D11867.
Style changes and incorporated comments.

Meinersbur abandoned this revision.Aug 13 2015, 10:52 AM

Merged into D11870

lib/CodeGen/CodeGeneration.cpp
99

memory address

135

There are not or at least I haven't seen them.