[PATCH] D33942: [Polly] [WIP] Getting a SCoP statement for each instruction [NFC]

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 10:56:46 PDT 2017


Meinersbur added inline comments.


================
Comment at: lib/Analysis/ScopInfo.cpp:2624
   // Initialize the invalid domain.
   auto *EntryStmt = getStmtFor(EntryBB);
   EntryStmt->setInvalidDomain(isl_set_empty(isl_set_get_space(S)));
----------------
nandini12396 wrote:
> nandini12396 wrote:
> > @Meinersbur : I would like to clarify again what it is to be done here. You said that the easiest approach would be to iterate over all statements that represent this BB and set their Invalid Domain. But I got confused why that is inefficient? Could you please repeat what you meant by using the `DomainMap` which maps BasicBlocks to their domains?
> Ok, I think I understood what you meant. Create a map of BB to Invalid Domain. So there is no need of using getStmtFor(BB) by directly setting in the map and using it to get it.
Yes, I meant creating a map and in a first step, compute the domain only for that map.
```
InvalidDomainMap[EntryBB] = ...
```

Then, in a second step, apply the InvalidDomain to all statement for their BasicBlock.

See `Scop::DomainMap` for a similar approach.


https://reviews.llvm.org/D33942





More information about the llvm-commits mailing list