OSDN Git Service

Fix two bugs in the pipeliner in renaming phis in the prolog and epilog
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Thu, 22 Dec 2016 18:49:55 +0000 (18:49 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Thu, 22 Dec 2016 18:49:55 +0000 (18:49 +0000)
commit2272dc886cc27388d06f256db084b891c1f0cbfd
tree21e67474cb8ad78a233ef0ced4507288d2da0e46
parentad47821c65d3791228def588aafb27a095c06433
Fix two bugs in the pipeliner in renaming phis in the prolog and epilog

When the pipeliner is renaming phi values, it may need to iterate through
the phi operands to check for other phis. However, the pipeliner should
stop once it reaches a phi that is outside the pipelined loop.

Also, when the generateExistingPhis code is unable to reuse an existing
phi, the default code that computes the PhiOp2 is only to be used when
the pipeliner is generating the kernel. Otherwise, the phi may be a value
computed earlier in the same epilog.

Patch by Brendon Cahoon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290355 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachinePipeliner.cpp
test/CodeGen/Hexagon/swp-epilog-phi10.ll [new file with mode: 0644]
test/CodeGen/Hexagon/swp-prolog-phi4.ll [new file with mode: 0644]