mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
RegionInfo: Allow to set the parent region of a basic block.
llvm-svn: 116394
This commit is contained in:
parent
16d5617ec3
commit
a2b5df5a6d
@ -565,6 +565,12 @@ public:
|
||||
/// region containing BB.
|
||||
Region *getRegionFor(BasicBlock *BB) const;
|
||||
|
||||
/// @brief Set the smallest region that surrounds a basic block.
|
||||
///
|
||||
/// @param BB The basic block surrounded by a region.
|
||||
/// @param R The smallest region that surrounds BB.
|
||||
void setRegionFor(BasicBlock *BB, Region *R);
|
||||
|
||||
/// @brief A shortcut for getRegionFor().
|
||||
///
|
||||
/// @param BB The basic block.
|
||||
|
@ -659,11 +659,14 @@ Region *RegionInfo::getRegionFor(BasicBlock *BB) const {
|
||||
return I != BBtoRegion.end() ? I->second : 0;
|
||||
}
|
||||
|
||||
void RegionInfo::setRegionFor(BasicBlock *BB, Region *R) {
|
||||
BBtoRegion[BB] = R;
|
||||
}
|
||||
|
||||
Region *RegionInfo::operator[](BasicBlock *BB) const {
|
||||
return getRegionFor(BB);
|
||||
}
|
||||
|
||||
|
||||
BasicBlock *RegionInfo::getMaxRegionExit(BasicBlock *BB) const {
|
||||
BasicBlock *Exit = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user