[PATCH] D34283: [IR] (NFC) [BasicBlock] updatePHIEdges, duplicatePHIEdges and fixPHIEdges

Marcin SÅ‚owik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 16 10:24:15 PDT 2017


Marandil created this revision.

[IR] Add three public functions to `BasicBlock` to handle bulk changes to PHINodes caused by changing control flow graph.
`updatePHIEdges` changes all usages of one BB into another BB.
`duplicatePHIEdges` duplicates all incoming edges from one BB into incoming edges from another BB.
`fixPHIEdges` checks if a given BB is still a valid predecessor and based on this uses either of update or duplicate.

This diff is a follow up after https://reviews.llvm.org/D33787. I am submitting a new diff and closing the old one, since the inline comments in the latter would be unintelligible after the API changes.


https://reviews.llvm.org/D34283

Files:
  include/llvm/IR/BasicBlock.h
  lib/IR/BasicBlock.cpp
  unittests/IR/BasicBlockTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34283.102844.patch
Type: text/x-patch
Size: 7371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170616/19e562f3/attachment.bin>


More information about the llvm-commits mailing list