[ScopBuilder] Avoid use of getStmtFor(BB). NFC.

Since there will be no more a 1:1 correspondence between statements
and basic blocks, we would like to get rid of the method getStmtFor(BB)
and its uses. Here we remove one of its uses in ScopBuilder by fetching
the statement in which the instruction lies.

Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in>

Differential Revision: https://reviews.llvm.org/D35610

llvm-svn: 308610
This commit is contained in:
Michael Kruse 2017-07-20 12:47:09 +00:00
parent 6431962792
commit 4642c3ce85
1 changed files with 4 additions and 4 deletions

View File

@ -880,11 +880,11 @@ static void verifyUse(Scop *S, Use &Op, LoopInfo &LI) {
/// happened yet, such that virtual and physical uses are equivalent.
static void verifyUses(Scop *S, LoopInfo &LI, DominatorTree &DT) {
for (auto *BB : S->getRegion().blocks()) {
auto *Stmt = S->getStmtFor(BB);
if (!Stmt)
continue;
for (auto &Inst : *BB) {
auto *Stmt = S->getStmtFor(&Inst);
if (!Stmt)
continue;
if (isIgnoredIntrinsic(&Inst))
continue;