mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-13 15:37:24 +00:00
RegionInfo: Allow to set the parent region of a basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116394 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6688c4a742
commit
9ee5c50776
@ -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…
x
Reference in New Issue
Block a user