[all-commits] [llvm/llvm-project] d72637: [ScopBuilder] Fix bug 38358 by preserving correct ...
llvm-git-migration via All-commits
all-commits at lists.llvm.org
Thu Oct 17 16:54:21 PDT 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d72637f5ccc43d457bfe227ccfe2eaa23936a37e
https://github.com/llvm/llvm-project/commit/d72637f5ccc43d457bfe227ccfe2eaa23936a37e
Author: Michael Kruse <llvm at meinersbur.de>
Date: 2019-10-17 (Thu, 17 Oct 2019)
Changed paths:
M polly/lib/Analysis/ScopBuilder.cpp
A polly/test/ScopInfo/preserve-equiv-class-order-in-basic_block.ll
Log Message:
-----------
[ScopBuilder] Fix bug 38358 by preserving correct order of ScopStmts.
ScopBuilder::buildEqivClassBlockStmts creates ScopStmts for instruction
groups in basic block and inserts these ScopStmts into Scop::StmtMap,
however, as described in llvm.org/PR38358, comment #5, StmtScops are
inserted into vector ScopStmt[BB] in wrong order. As a result,
ScopBuilder::buildSchedule creates wrong order sequence node.
Looking closer to code, it's clear there is no equivalent classes with
interleaving isOrderedInstruction(memory access) instructions after
joinOrderedInstructions. Afterwards, ScopStmts need to be created and
inserted in the original order of memory access instructions, however,
at the moment ScopStmts are inserted in the order of leader instructions
which are probably not memory access instructions.
The fix is simple with a standalone loop scanning
isOrderedInstruction(memory access) instructions in basic block and
inserting elements into LeaderToInstList one by one. The patch also
removes double reversing operations which are now unnecessary.
New test preserve-equiv-class-order-in-basic_block.ll is also added.
Differential Revision: https://reviews.llvm.org/D68941
llvm-svn: 375192
More information about the All-commits
mailing list