diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-02-18 00:41:37 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-02-18 00:41:37 -0500 |
| commit | 96f6bc8a3099754bf79a05af7a1ec342f8030335 (patch) | |
| tree | 9ff52b5339140d453fb0163a0eb7bba3501d0a27 /basicblock.cpp | |
| parent | c46c3a9540f4d15eff8aa9660df69e374f7fd2f5 (diff) | |
Add back edge property to block edges
Diffstat (limited to 'basicblock.cpp')
| -rw-r--r-- | basicblock.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/basicblock.cpp b/basicblock.cpp index 58fcb4aa..d6423fa0 100644 --- a/basicblock.cpp +++ b/basicblock.cpp @@ -345,3 +345,9 @@ void BasicBlock::SetUserBasicBlockHighlight(uint8_t r, uint8_t g, uint8_t b, uin hc.alpha = alpha; SetUserBasicBlockHighlight(hc); } + + +bool BasicBlock::IsBackEdge(BasicBlock* source, BasicBlock* target) +{ + return source->GetDominators().count(target) != 0; +} |
