diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-04-10 06:54:49 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-04-10 06:54:49 +0000 |
commit | 141cc3e85fde5e09c79c1687b987eacf47bec8a0 (patch) | |
tree | 978ffdd555176f1b8dcc928a07d51cec85abeacf /llvm/include | |
parent | 500b004566138520174c4d4ef2c1f741a324f3a5 (diff) | |
download | bcm5719-llvm-141cc3e85fde5e09c79c1687b987eacf47bec8a0.tar.gz bcm5719-llvm-141cc3e85fde5e09c79c1687b987eacf47bec8a0.zip |
RegionInfo: Add helpers to replace entry/exit recursively
Contributed by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 179157
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/Analysis/RegionInfo.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/RegionInfo.h b/llvm/include/llvm/Analysis/RegionInfo.h index 69cc2938113..e87319516cd 100644 --- a/llvm/include/llvm/Analysis/RegionInfo.h +++ b/llvm/include/llvm/Analysis/RegionInfo.h @@ -266,6 +266,24 @@ public: /// @param BB The new exit basic block of the region. void replaceExit(BasicBlock *BB); + /// @brief Recursively replace the entry basic block of the region. + /// + /// This function replaces the entry basic block with a new basic block. It + /// also updates all child regions that have the same entry basic block as + /// this region. + /// + /// @param NewEntry The new entry basic block. + void replaceEntryRecursive(BasicBlock *NewEntry); + + /// @brief Recursively replace the exit basic block of the region. + /// + /// This function replaces the exit basic block with a new basic block. It + /// also updates all child regions that have the same exit basic block as + /// this region. + /// + /// @param NewExit The new exit basic block. + void replaceExitRecursive(BasicBlock *NewExit); + /// @brief Get the exit BasicBlock of the Region. /// @return The exit BasicBlock of the Region, NULL if this is the TopLevel /// Region. |