[polly] r304502 - [CodeGen] Iterate over explicit instruction list for block statements. NFC

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 22:28:30 PDT 2017


Hi David,

this commit has test coverage, but as it is a non-functional change, no
tests change. It was committed in preparation of future functional
changes, which will then also require new tests.

Best,
Tobias

On Mon, Jun 5, 2017, at 08:39 PM, David Blaikie via llvm-commits wrote:
> Does this need test coverage of some kind?
> 
> On Thu, Jun 1, 2017 at 5:14 PM Michael Kruse via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> 
> > Author: meinersbur
> > Date: Thu Jun  1 19:13:49 2017
> > New Revision: 304502
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=304502&view=rev
> > Log:
> > [CodeGen] Iterate over explicit instruction list for block statements. NFC
> >
> > For when statements do not contain all instructions of a BasicBlock
> > anymore, the block generator needs to go through the explicit list of
> > instructions it contains.
> >
> > Contributed-by: Nandini Singhal <cs15mtech01004 at iith.ac.in>
> >
> > Differential Revision: https://reviews.llvm.org/D33653
> >
> > Modified:
> >     polly/trunk/include/polly/ScopInfo.h
> >     polly/trunk/lib/CodeGen/BlockGenerators.cpp
> >
> > Modified: polly/trunk/include/polly/ScopInfo.h
> > URL:
> > http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=304502&r1=304501&r2=304502&view=diff
> >
> > ==============================================================================
> > --- polly/trunk/include/polly/ScopInfo.h (original)
> > +++ polly/trunk/include/polly/ScopInfo.h Thu Jun  1 19:13:49 2017
> > @@ -1502,6 +1502,10 @@ public:
> >    Scop *getParent() { return &Parent; }
> >    const Scop *getParent() const { return &Parent; }
> >
> > +  const std::vector<Instruction *> &getInstructions() const {
> > +    return Instructions;
> > +  }
> > +
> >    const char *getBaseName() const;
> >
> >    /// Set the isl AST build.
> >
> > Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=304502&r1=304501&r2=304502&view=diff
> >
> > ==============================================================================
> > --- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
> > +++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Thu Jun  1 19:13:49 2017
> > @@ -441,8 +441,12 @@ void BlockGenerator::copyBB(ScopStmt &St
> >                              isl_id_to_ast_expr *NewAccesses) {
> >    EntryBB = &CopyBB->getParent()->getEntryBlock();
> >
> > -  for (Instruction &Inst : *BB)
> > -    copyInstruction(Stmt, &Inst, BBMap, LTS, NewAccesses);
> > +  if (Stmt.isBlockStmt())
> > +    for (Instruction *Inst : Stmt.getInstructions())
> > +      copyInstruction(Stmt, Inst, BBMap, LTS, NewAccesses);
> > +  else
> > +    for (Instruction &Inst : *BB)
> > +      copyInstruction(Stmt, &Inst, BBMap, LTS, NewAccesses);
> >  }
> >
> >  Value *BlockGenerator::getOrCreateAlloca(const MemoryAccess &Access) {
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list