This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Remove dependency of `Scop::getLastStmtFor(BB)` on `getStmtFor(BB)`. [NFC].
ClosedPublic

Authored by nandini12396 on Jul 20 2017, 1:26 AM.

Details

Summary

We are working towards removing uses of Scop::getStmtFor(BB). In this patch, we remove dependency of Scop::getLastStmtFor(BB) on getStmtFor(BB). To do so, we get the list of all statements corresponding to the BB and then fetch the last one.

Diff Detail

Repository
rL LLVM

Event Timeline

nandini12396 created this revision.Jul 20 2017, 1:26 AM
Meinersbur edited edge metadata.Jul 20 2017, 5:54 AM

Looks good, with a single remark.

lib/Analysis/ScopInfo.cpp
4925–4926 ↗(On Diff #107460)

This executes getStmtListFor(BB) for the same argument twice. Could you store its result in a variable for reuse?

Addressed comments.

Meinersbur accepted this revision.Jul 20 2017, 10:05 AM
This revision is now accepted and ready to land.Jul 20 2017, 10:05 AM
This revision was automatically updated to reflect the committed changes.