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.
Details
Details
- Reviewers
Meinersbur grosser bollu - Commits
- rG6eba4b1031a2: [ScopInfo] Remove dependency of Scop::getLastStmtFor(BB) on getStmtFor(BB). NFC.
rPLO308633: [ScopInfo] Remove dependency of Scop::getLastStmtFor(BB) on getStmtFor(BB). NFC.
rL308633: [ScopInfo] Remove dependency of Scop::getLastStmtFor(BB) on getStmtFor(BB). NFC.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
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? |