[PATCH] D134989: SSAUpdaterBulk: properly distinguish between the middle and end of a block

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 13:21:21 PDT 2022


nhaehnle created this revision.
nhaehnle added reviewers: mzolotukhin, dberlin, davide.
Herald added subscribers: nlopes, hiraditya.
Herald added a project: All.
nhaehnle requested review of this revision.
Herald added a project: LLVM.

Correct SSA update / phi insertion requires us to separately track the
value at the end of a block, i.e. after a user-provided definition, and
at the beginning, i.e. incoming values from predecessors (if any).

This change aligns the behavior of SSAUpdaterBulk with that of
SSAUpdater to avoid risk of confusion.

SSAUpdaterBulk is a separate implementation that isn't used for much at
all and seems to not have seen much testing. Its interface can sometimes
be convenient (which is why I tried to use it) and the commit of its initial
introduction claims a performance benefit to using dominator trees in
the bulk case, so it seems worth fixing this implementation.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134989

Files:
  llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h
  llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp
  llvm/unittests/Transforms/Utils/SSAUpdaterBulkTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134989.464380.patch
Type: text/x-patch
Size: 7476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220930/3f2b74bf/attachment.bin>


More information about the llvm-commits mailing list